We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fe3df0 commit ebc5df8Copy full SHA for ebc5df8
tests/test_config.py
@@ -1,4 +1,5 @@
1
import os.path
2
+import shutil
3
4
import pytest
5
@@ -31,6 +32,17 @@ def test_load_config_from_yaml():
31
32
assert res[1]["name"] == "something-else"
33
34
35
+def test_load_config_works_without_fileext(tmp_path):
36
+ """Ensure load_config does not interpret file path or file name."""
37
+
38
+ example_config = os.path.join(CURRENT_DIR, "example-config.yaml")
39
+ dest = tmp_path / "a"
40
+ shutil.copyfile(example_config, dest)
41
+ res = load_config(dest)
42
+ assert isinstance(res, list)
43
+ assert len(res) == 2
44
45
46
def test_load_config_handles_non_existing_file():
47
""" "Ensure load_config raises FileNotFoundError."""
48
0 commit comments