diff --git a/tests/modules/test_preparser.py b/tests/modules/test_preparser.py new file mode 100644 index 0000000..691e04e --- /dev/null +++ b/tests/modules/test_preparser.py @@ -0,0 +1,23 @@ +# Testing the preparser module +import pytest + +from bootstraparse.modules import preparser +from bootstraparse.modules import environment + +env = environment.Environment() + + +@pytest.mark.parametrize("path", ["example_userfiles/index.bpr", "example_userfiles/pages/page1.bpr"]) +def test_preparser_init(path): + """ + Test the preparser module + """ + pp = preparser.PreParser(path, env) + assert pp.path == path + pp.make_import_list() + pp.open() + pp.close() + pp.export_with_imports() + # pp.export_without_imports() + assert type(pp.__str__()) == str + assert type(pp.__repr__()) == str \ No newline at end of file