From 5336fe0234bd760ae403ba7ce791754a7aa6d1a9 Mon Sep 17 00:00:00 2001 From: Derval Guillaume <gderval@uliege.be> Date: Tue, 25 Jun 2024 11:54:51 +0200 Subject: [PATCH] Fix removed function --- tests/test_parsing.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_parsing.py b/tests/test_parsing.py index a961f6c..aeee651 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -4,7 +4,7 @@ from pathlib import Path from lark.exceptions import UnexpectedCharacters, UnexpectedToken from gboml.ast.check import check -from gboml.parsing import parse_file +from gboml.parsing import GBOMLParser instance_dir = Path(__file__).parent / "instances" @@ -22,19 +22,21 @@ should_not_pass = [x if str(x).endswith(".txt")] +parser = GBOMLParser() + class TestParsing(unittest.TestCase): def test_parse(self): """ Checks if the file (doesn't) parses """ for filename in should_pass: with self.subTest(filename=filename): - out = parse_file(str(filename)) + out = parser.parse_file(str(filename)) check(out) def test_not_parse(self): for filename in should_not_pass: with self.subTest(filename=filename): try: - out = parse_file(str(filename)) + out = parser.parse_file(str(filename)) check(out) except: continue -- GitLab