Skip to content
Snippets Groups Projects
Commit 5336fe02 authored by Derval Guillaume's avatar Derval Guillaume
Browse files

Fix removed function

parent af6ee382
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ from pathlib import Path ...@@ -4,7 +4,7 @@ from pathlib import Path
from lark.exceptions import UnexpectedCharacters, UnexpectedToken from lark.exceptions import UnexpectedCharacters, UnexpectedToken
from gboml.ast.check import check from gboml.ast.check import check
from gboml.parsing import parse_file from gboml.parsing import GBOMLParser
instance_dir = Path(__file__).parent / "instances" instance_dir = Path(__file__).parent / "instances"
...@@ -22,19 +22,21 @@ should_not_pass = [x ...@@ -22,19 +22,21 @@ should_not_pass = [x
if str(x).endswith(".txt")] if str(x).endswith(".txt")]
parser = GBOMLParser()
class TestParsing(unittest.TestCase): class TestParsing(unittest.TestCase):
def test_parse(self): def test_parse(self):
""" Checks if the file (doesn't) parses """ """ Checks if the file (doesn't) parses """
for filename in should_pass: for filename in should_pass:
with self.subTest(filename=filename): with self.subTest(filename=filename):
out = parse_file(str(filename)) out = parser.parse_file(str(filename))
check(out) check(out)
def test_not_parse(self): def test_not_parse(self):
for filename in should_not_pass: for filename in should_not_pass:
with self.subTest(filename=filename): with self.subTest(filename=filename):
try: try:
out = parse_file(str(filename)) out = parser.parse_file(str(filename))
check(out) check(out)
except: except:
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment