chiark / gitweb /
pelican-theme: don't attempt to query a Pelican version in the test.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 14 Sep 2024 23:28:51 +0000 (01:28 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 14 Sep 2024 23:50:12 +0000 (01:50 +0200)
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.

pelican-theme/test/test_page.py

index 4113fb0925d39a9c7769f339a3084e495fb783dd..7a048643eb7575cf575377ead5b9652bb431ba88 100644 (file)
@@ -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",