From: Vladimír Vondruš Date: Sat, 14 Sep 2024 23:28:51 +0000 (+0200) Subject: pelican-theme: don't attempt to query a Pelican version in the test. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e2c9da10be1cd7feab3410b994820f3e1767b5ef;p=blog.git pelican-theme: don't attempt to query a Pelican version in the test. Because I rely on ancient pygments (gotta fix that too), I cannot use Pelican 4.9.0+ as it requires a newer version. And on Python 3.12 pelican.__version__ with Pelican 4.8.0 says "unknown" (probably due to not being ported to the new packaging thingy or whatever), breaking the version parser in the test. I'm querying the version just to skip a test that relies on a PR that I opened in 2017 and didn't have time to get back to. I likely won't have for another decade, so can just skip this always. --- diff --git a/pelican-theme/test/test_page.py b/pelican-theme/test/test_page.py index 4113fb09..7a048643 100644 --- a/pelican-theme/test/test_page.py +++ b/pelican-theme/test/test_page.py @@ -27,7 +27,7 @@ import unittest import pelican -from . import PageTestCase, parse_version +from . import PageTestCase class Page(PageTestCase): def __init__(self, *args, **kwargs): @@ -158,10 +158,9 @@ class HtmlEscape(PageTestCase): self.assertEqual(*self.actual_expected_contents('landing.html')) self.assertEqual(*self.actual_expected_contents('breadcrumb.html')) - # Not merged for 4.7 yet and no time from my side to push the PR through, - # so let's defer this to blow up at some point in the future. - @unittest.skipUnless(parse_version(pelican.__version__) > parse_version("5.0.0"), - "https://github.com/getpelican/pelican/pull/2260") + # Not merged yet and no time from my side to push the PR through, so let's + # just skip this + @unittest.skip("https://github.com/getpelican/pelican/pull/2260") def test_content(self): self.run_pelican({ 'SITENAME': "<&> in site name",