Layed out a base skeleton for testing

This commit is contained in:
Maximilien Rigaut 2022-02-05 23:38:04 +01:00
parent d334044f6e
commit 0ba4f8ffe4
1 changed files with 23 additions and 0 deletions

View File

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