Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d72f069 commit 833f48dCopy full SHA for 833f48d
lib/matplotlib/tests/__init__.py
@@ -1,11 +1,15 @@
1
-import os
+from distutils.version import LooseVersion
2
+from pathlib import Path
3
4
+import pytest
5
-# Check that the test directories exist
-if not os.path.exists(os.path.join(
6
- os.path.dirname(__file__), 'baseline_images')):
+
7
+# Check that the test directories exist.
8
+if not (Path(__file__).parent / 'baseline_images').exists():
9
raise IOError(
10
'The baseline image directory does not exist. '
11
'This is most likely because the test data is not installed. '
12
'You may need to install matplotlib from source to get the '
13
'test data.')
14
+if LooseVersion(pytest.__version__) < "3.6":
15
+ raise RuntimeError('pytest>=3.6 is required to run the tests')
0 commit comments