diff --git a/tests/test_config.py b/tests/test_config.py index d6149b1..d267bee 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,4 +1,5 @@ import os.path +import shutil import pytest @@ -31,6 +32,17 @@ def test_load_config_from_yaml(): assert res[1]["name"] == "something-else" +def test_load_config_works_without_fileext(tmp_path): + """Ensure load_config does not interpret file path or file name.""" + + example_config = os.path.join(CURRENT_DIR, "example-config.yaml") + dest = tmp_path / "a" + shutil.copyfile(example_config, dest) + res = load_config(dest) + assert isinstance(res, list) + assert len(res) == 2 + + def test_load_config_handles_non_existing_file(): """ "Ensure load_config raises FileNotFoundError."""