From: Vladimír Vondruš Date: Mon, 11 Dec 2017 14:24:52 +0000 (+0100) Subject: m.math: test only on Python 3.5+. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=8bb27d2d9d58302f378313c9108e76d58d307854;p=blog.git m.math: test only on Python 3.5+. --- diff --git a/pelican-plugins/m/test/test_math.py b/pelican-plugins/m/test/test_math.py index 91894afa..961213d7 100644 --- a/pelican-plugins/m/test/test_math.py +++ b/pelican-plugins/m/test/test_math.py @@ -1,9 +1,16 @@ +import sys +import unittest + +from distutils.version import LooseVersion + from m.test import PluginTestCase class Math(PluginTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, '', *args, **kwargs) + @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5"), + "The math plugin requires at least Python 3.5") def test(self): self.run_pelican({ 'PLUGINS': ['m.htmlsanity', 'm.math']