diff --git a/tests/modules/test_context_mngr.py b/tests/modules/test_context_mngr.py index 87bd094..c61ab1c 100644 --- a/tests/modules/test_context_mngr.py +++ b/tests/modules/test_context_mngr.py @@ -465,7 +465,7 @@ _zipped_token_list_with_expected_result = [ @pytest.fixture def base_cm(): lst = _base_list[:] - base = context_mngr.ContextManager(_base_list) + base = context_mngr.ContextManager(lst) base() return base diff --git a/tests/modules/test_sitecrawler.py b/tests/modules/test_sitecrawler.py index b562acb..1e6263b 100644 --- a/tests/modules/test_sitecrawler.py +++ b/tests/modules/test_sitecrawler.py @@ -2,7 +2,6 @@ import os import tempfile import pytest -import rich import bootstraparse.modules.sitecrawler as sitecrawler from bootstraparse.modules import environment, config, pathresolver, export, preparser diff --git a/tests/modules/test_sitecreator.py b/tests/modules/test_sitecreator.py index cb00c80..51667fe 100644 --- a/tests/modules/test_sitecreator.py +++ b/tests/modules/test_sitecreator.py @@ -1,17 +1,65 @@ -import bootstraparse.modules.sitecreator as sitecreator +import os +import tempfile + import pytest +from bootstraparse.modules import sitecreator, syntax, context_mngr -@pytest.mark.xfail(reason="TODO") -def test_create_site(): - sitecreator.create_website() - sitecreator.create_environment() - sitecreator.create_config() - sitecreator.create_crawler() - sitecreator.create_user_config() - sitecreator.create_template() - sitecreator.env_checker() - sitecreator.begin_crawling(None) - sitecreator.begin_pre_parsing(None) - sitecreator.begin_parsing(None) - sitecreator.begin_export(None) +_TEMP_DIRECTORY = tempfile.TemporaryDirectory() +_BASE = os.path.join(_TEMP_DIRECTORY.name, "base") +_DEST = os.path.join(_TEMP_DIRECTORY.name, "dest") +files = [ + ("base/test1.bpr", "*Test*", "Test\n"), + ("base/test2.bpr", ":: <_noimport.bpr>", 'linktext\n'), + ("base/test3.bpr", "#. List", "