File tree 2 files changed +43
-4
lines changed
2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 1
- [pytest]
2
- # NOTE: Because tests can be run from an installed copy, most of our Pytest
1
+ # Because tests can be run from an installed copy, most of our Pytest
3
2
# configuration is in the `pytest_configure` function in
4
3
# `lib/matplotlib/testing/conftest.py`. This configuration file exists only to
5
- # prevent Pytest from wasting time trying to check examples and documentation
6
- # files that are not really tests.
4
+ # set a minimum pytest version and to prevent pytest from wasting time trying
5
+ # to check examples and documentation files that are not really tests.
6
+
7
+ [pytest]
8
+ minversion = 3.6
9
+
7
10
testpaths = lib
11
+ python_files = test_*.py
12
+ junit_family = xunit2
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ #
3
+ # This allows running the matplotlib tests from the command line: e.g.
4
+ #
5
+ # $ python tests.py -v -d
6
+ #
7
+ # The arguments are identical to the arguments accepted by pytest.
8
+ #
9
+ # See http://doc.pytest.org/ for a detailed description of these options.
10
+
11
+ import sys
12
+ import argparse
13
+
14
+
15
+ if __name__ == '__main__' :
16
+ try :
17
+ from matplotlib import test
18
+ except ImportError :
19
+ print ('matplotlib.test could not be imported.\n \n '
20
+ 'Try a virtual env and `pip install -e .`' )
21
+ sys .exit (- 1 )
22
+
23
+ parser = argparse .ArgumentParser (add_help = False )
24
+ parser .add_argument ('--recursionlimit' , type = int , default = None ,
25
+ help = 'Specify recursionlimit for test run' )
26
+ args , extra_args = parser .parse_known_args ()
27
+
28
+ print ('Python byte-compilation optimization level:' , sys .flags .optimize )
29
+
30
+ if args .recursionlimit is not None : # Will trigger deprecation.
31
+ retcode = test (argv = extra_args , recursionlimit = args .recursionlimit )
32
+ else :
33
+ retcode = test (argv = extra_args )
34
+ sys .exit (retcode )
You can’t perform that action at this time.
0 commit comments