This repository was archived by the owner on Jun 23, 2020. It is now read-only.
forked from matplotlib/matplotlib
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
Latest commit
executable file
·55 lines (43 loc) · 1.48 KB
/
Copy pathtests.py
File metadata and controls
executable file
·55 lines (43 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python
#
# This allows running the matplotlib tests from the command line: e.g.
#
# $ python tests.py -v -d
#
# The arguments are identical to the arguments accepted by nosetests.
#
# See https://nose.readthedocs.org/ for a detailed description of
# these options.
importos
importsys
importtime
importmatplotlib
matplotlib.use('agg')
importnose
frommatplotlibimportdefault_test_modules
defrun(extra_args):
fromnose.pluginsimportmultiprocess
env=matplotlib._get_nose_env()
matplotlib._init_tests()
# Nose doesn't automatically instantiate all of the plugins in the
# child processes, so we have to provide the multiprocess plugin with
# a list.
plugins=matplotlib._get_extra_test_plugins()
multiprocess._instantiate_plugins=plugins
nose.main(addplugins=[x() forxinplugins],
defaultTest=default_test_modules,
argv=sys.argv+extra_args,
env=env)
if__name__=='__main__':
extra_args= []
if'--no-pep8'insys.argv:
default_test_modules.remove('matplotlib.tests.test_coding_standards')
sys.argv.remove('--no-pep8')
elif'--pep8'insys.argv:
default_test_modules= ['matplotlib.tests.test_coding_standards']
sys.argv.remove('--pep8')
if'--no-network'insys.argv:
frommatplotlib.testingimportdisable_internet
disable_internet.turn_off_internet()
extra_args.extend(['--eval-attr="not network"'])
run(extra_args)