diff --git a/tests/modules/test_preparser.py b/tests/modules/test_preparser.py index caa9b2a..97d9eeb 100644 --- a/tests/modules/test_preparser.py +++ b/tests/modules/test_preparser.py @@ -103,8 +103,8 @@ website_tree = { } get_from_config = ''' -@{shortcut}{class="shortcut", type=2, name="shortcut"}[type=33, name="shortcut"] -@[picture]{class="picture", type=2, name="picture"}[type=33, name="picture"] +@{shortcut}{class="shortcut", type=2, name="shortcut"}[type=33, name="shortcut"]{{classinsert +@[picture]{class="picture", type=2, name="picture"}[type=33, name="picture"]{{hello}} ''' @@ -348,15 +348,15 @@ def test_rich_tree(): pp.rich_tree(force=False) -@pytest.mark.xfail(reason="Not implemented") +# @pytest.mark.xfail(reason="Not implemented") def test_get_shortcut_from_config(): - from_config = temp_name("test_get_shortcut_from_config.bpr") + from_config = temp_name("get_from_config.bpr") make_new_file(from_config, get_from_config) pp = preparser.PreParser(from_config, env) pp.make_import_list() + assert pp.get_image_from_config("any_picture", "") == '''''' assert pp.get_alias_from_config("any_shortcut", None) == "

any_shortcut

" - assert pp.get_image_from_config("any_picture", None) == '' @pytest.mark.xfail(reason="Not implemented") @@ -367,12 +367,11 @@ def test_replace(): pp.make_import_list() pp.export_with_imports() - # pp.parse_import_list() - # pp.make_import_list() image_f = pp.parse_shortcuts_and_images() assert image_f.read() == """\n\n

picture

\n""" + def test_early_tree(base_architecture): tree_file = temp_name(os.path.join(_BASE_PATH_GIVEN, "index.bpr")) assert os.path.exists(tree_file)