forked from NSLS-II/metadatastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.py
35 lines (27 loc) · 895 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
35
#!/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 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 skxray.testing.noseclasses import KnownFailure
# plugins = [KnownFailure]
plugins = []
env = {"NOSE_WITH_COVERAGE": 1,
'NOSE_COVER_PACKAGE': 'metadatastore',
'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.
from nose.plugins import multiprocess
multiprocess._instantiate_plugins = plugins
def run():
nose.main(addplugins=[x() for x in plugins], env=env)
if __name__ == '__main__':
run()