diff --git a/pelican/plugins/sitemap/test_sitemap.py b/pelican/plugins/sitemap/test_sitemap.py index 2a69990..0622433 100644 --- a/pelican/plugins/sitemap/test_sitemap.py +++ b/pelican/plugins/sitemap/test_sitemap.py @@ -1,3 +1,4 @@ +import importlib.resources from pathlib import Path from shutil import rmtree from tempfile import mkdtemp @@ -8,7 +9,7 @@ from . import sitemap -BASE_DIR = Path(".").resolve() +BASE_DIR = importlib.resources.files(__package__) TEST_DATA = BASE_DIR / "test_data" @@ -24,6 +25,7 @@ def tearDown(self): def _run_pelican(self, sitemap_format): settings = read_settings( override={ + "PATH": BASE_DIR, "CACHE_CONTENT": False, "SITEURL": "http://localhost", "CONTENT": TEST_DATA,