Skip to content

Commit ca1489e

Browse files
committed
🔬 test incorrrect data file intput
1 parent a67bd6c commit ca1489e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_context.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@ def test_json_data_overrides_environ_variables():
2727
context = Context(os.path.join("tests", "fixtures"))
2828
data = context.get_data("simple.json")
2929
eq_(data[test_var], test_value)
30+
31+
32+
def test_unknown_data_file():
33+
test_var = "TEST_ENVIRONMENT_VARIABLE"
34+
test_value = "am I found"
35+
os.environ[test_var] = test_value
36+
context = Context(os.path.join("tests", "fixtures"))
37+
data = context.get_data("unknown.data")
38+
eq_(data[test_var], test_value)

0 commit comments

Comments
 (0)