summaryrefslogtreecommitdiff
path: root/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
diff options
context:
space:
mode:
Diffstat (limited to 'docutils/test/test_parsers/test_rst/test_directives/test_code_long.py')
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_code_long.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py b/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
index 641a5f1d9..6b2f24a95 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
@@ -21,14 +21,8 @@ from docutils.frontend import get_default_settings
from docutils.parsers.rst import Parser
from docutils.utils import new_document
from docutils.utils.code_analyzer import with_pygments
-
-try:
- from pygments import __version__ as _pygments_ver
-except ImportError:
- _pygments_ver = ''
- PYGMENTS_2_14_PLUS = False
-else:
- PYGMENTS_2_14_PLUS = tuple(map(int, _pygments_ver.split('.'))) >= (2, 14)
+from test.test_parsers.test_rst.test_directives.test_code \
+ import PYGMENTS_2_14_PLUS
@unittest.skipUnless(with_pygments, 'needs Pygments')