diff options
Diffstat (limited to 'src/parser_unittest.py')
-rw-r--r-- | src/parser_unittest.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/parser_unittest.py b/src/parser_unittest.py index 9ada265..8d0d600 100644 --- a/src/parser_unittest.py +++ b/src/parser_unittest.py @@ -41,7 +41,7 @@ Another back with open(path, "w") as f: f.write(file_contents) - cards = parser.parse(path) + cards = parser.parseFile(path) assert expected == set(cards.values()) @@ -51,11 +51,7 @@ def test_emptyFile(tmp_path): with open(path, "w") as f: f.write("") - cards = parser.parse(path) - assert cards == {} - -def test_missingFile(tmp_path): - cards = parser.parse(tmp_path / "missing_file.fcard") + cards = parser.parseFile(path) assert cards == {} def checkException(tmp_path, file_contents): @@ -64,7 +60,7 @@ def checkException(tmp_path, file_contents): f.write(file_contents) with pytest.raises(Exception): - cards = parser.parse(path) + cards = parser.parseFile(path) def test_doesNotStartWithFront(tmp_path): checkException(tmp_path, "BACK\noops") |