From 28afae563e3e32187b389db4680bcc08b9fc55a9 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 25 Sep 2024 16:12:53 +0200 Subject: General improvements, CLI initial implementation --- src/parser_unittest.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/parser_unittest.py') 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") -- cgit v1.2.3