Skip to content

Commit

Permalink
Minor test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Aug 28, 2024
1 parent fb88d3f commit c7a4616
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ def non_existent_config_path():
@pytest.fixture
def non_dict_platform_translations_config_path():
return (
(Path(__file__).parent / "files/non_dict_platform_translations.json").resolve()
)
Path(__file__).parent / "files/non_dict_platform_translations.json"
).resolve()

@pytest.fixture
def valid_platform_translations_config_path():
path = (Path(__file__).parent / "files/valid_platform_translations.json").resolve()
path = (
Path(__file__).parent / "files/valid_platform_translations.json"
).resolve()
with path.open(encoding="utf-8") as file:
config_data = json.load(file)
file.close()
Expand Down Expand Up @@ -59,7 +61,12 @@ def test_loading_valid_config(valid_platform_translations_config_path):
config_platform_translations = (
config.load(valid_platform_translations_config_path)
)
assert config_platform_translations["WINDOWS:Hello:MAC:Hi:LINUX:Good day:OTHER:Whassup"] == ("text", "Hi")
assert (
config_platform_translations[
"WINDOWS:Hello:MAC:Hi:LINUX:Good day:OTHER:Whassup"
]
== ("text", "Hi")
)

def test_saving_config(valid_platform_translations_config_path):
platform_translations = {"foo": ("text", "bar")}
Expand Down

0 comments on commit c7a4616

Please sign in to comment.