betty.test_utils.locale package

Submodules

Module contents

Test utilities for betty.locale.

class betty.test_utils.locale.PotFileTestBase[source]

Bases: object

A base class for testing that a *.pot file is up to date.

assets_directory_path() Path[source]

The assets directory path containing the translations that are being tested.

command() str[source]

The command to suggest the developer runs in case the translations are out of date.

async test() None[source]

Test the translations.

async update_translations(output_assets_directory_path_override: Path) None[source]

Update the translations into the given directory.

class betty.test_utils.locale.ProjectPotFileTestBase[source]

Bases: PotFileTestBase

A base class for testing that an end user’s project’s *.pot file is up to date.

assets_directory_path() Path[source]

The assets directory path containing the translations that are being tested.

command() str[source]

The command to suggest the developer runs in case the translations are out of date.

exclude_source_directory_paths() set[Path][source]

The paths to any descendant source directories to exclude.

project_directory_path() Path[source]

Get the path to the directory of the project under test.

source_directory_path() Path | None[source]

The path to a source directory to include.

async update_translations(output_assets_directory_path_override: Path) None[source]

Update the translations into the given directory.