Skip to content

Commit

Permalink
fixes test_site by correcting the outptu path
Browse files Browse the repository at this point in the history
* [Bug]: Testing creates an output folder in the project root
Fixes #536

* Merge branch 'main' of https://github.com/render-engine/render-engine into pin-pytest-version-due-to-pytest-lazy-fixture

* pin version

* fixes test_site by correcting the outptu path

* Merge remote-tracking branch 'origin/main' into fixes-test-for-custom-collection-page
  • Loading branch information
kjaymiller committed Jan 31, 2024
1 parent 5b977fd commit 0d17892
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ def test_url_for_Collection_in_site(site: Site, tmp_path: pathlib.Path):
test_template.write_text("The URL is '{{ 'customcollection.customcollectionpage' | url_for }}'")

site.theme_manager.engine.loader.loaders.insert(0, FileSystemLoader(tmp_path))
site.output_path = tmp_path

class CustomCollectionPage(Page):
template = test_template.name
Expand All @@ -209,7 +208,7 @@ class CustomCollection(Collection):
pages = [CustomCollectionPage()]

site.render()
custom_page = tmp_path / "customcollectionpage.html"
custom_page = site.output_path / "customcollectionpage.html"
assert custom_page.exists()
assert custom_page.read_text() == "The URL is '/customcollectionpage.html'"

Expand Down

0 comments on commit 0d17892

Please sign in to comment.