diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-08-31 01:09:37 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-08-31 15:53:33 +0200 |
| commit | 284f3972844ea124c0cd9ee5500e99440bb96aac (patch) | |
| tree | b8dee22222c38b12cc00daf98280e1b2060bcca7 /tests/page_test.py | |
| parent | b06dbf67b9ac9e329922d7911ee7a9b09419c5f0 (diff) | |
| download | git2hugo-284f3972844ea124c0cd9ee5500e99440bb96aac.tar.gz | |
g2h: Add file page
Also move helpers to dedicated files.
Diffstat (limited to 'tests/page_test.py')
| -rw-r--r-- | tests/page_test.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/page_test.py b/tests/page_test.py deleted file mode 100644 index c68e435..0000000 --- a/tests/page_test.py +++ /dev/null @@ -1,19 +0,0 @@ -from g2h.page import Page -from jinja2.exceptions import TemplateNotFound -import pytest - -def test_init(): - page = Page('overview.md', 'dir', 'file', 'name', 'sub/dir') - assert(page.name == 'name') - assert(page.out_file_path == 'dir/file') - assert(page.template.name == 'overview.md') - assert(page.content_subdir == 'sub/dir') - -def test_wrong_template(): - with pytest.raises(TemplateNotFound): - Page('not existant.md', 'dir', 'file', 'name', '') - -def test_no_context(): - page = Page('overview.md', 'dir', 'file', 'name', '') - with pytest.raises(NotImplementedError): - page.context() |