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
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
......
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