forked from bluesky/suitcase-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_tests.py
34 lines (26 loc) · 839 Bytes
/
run_tests.py
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
#!/usr/bin/env python
# This file is closely based on tests.py from matplotlib
#
# This allows running the matplotlib tests from the command line: e.g.
#
# $ python run_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.
import nose
from nose.plugins import multiprocess
# plugins = [KnownFailure]
plugins = []
env = {"NOSE_WITH_COVERAGE": 1,
'NOSE_COVER_PACKAGE': 'history',
'NOSE_COVER_HTML': 1}
# Nose doesn't automatically instantiate all of the plugins in the
# child processes, so we have to provide the multiprocess plugin with
# a list.
multiprocess._instantiate_plugins = plugins
def run():
nose.main(addplugins=[x() for x in plugins], env=env)
if __name__ == '__main__':
run()