You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ... importdefault_test_modules, get_backend, use
34
+
35
+
old_backend=get_backend()
36
+
try:
37
+
use('agg')
38
+
importnose
39
+
fromnose.pluginsimportmultiprocess
40
+
41
+
# Nose doesn't automatically instantiate all of the plugins in the
42
+
# child processes, so we have to provide the multiprocess plugin with
43
+
# a list.
44
+
extra_plugins=get_extra_test_plugins()
45
+
multiprocess._instantiate_plugins=extra_plugins
46
+
47
+
env=get_env()
48
+
ifcoverage:
49
+
env['NOSE_WITH_COVERAGE'] =1
50
+
51
+
ifverbosityisnotNone:
52
+
env['NOSE_VERBOSE'] =verbosity
53
+
54
+
success=nose.run(
55
+
addplugins=[plugin() forplugininextra_plugins],
56
+
env=env,
57
+
defaultTest=default_test_modules,
58
+
**kwargs
59
+
)
60
+
finally:
61
+
ifold_backend.lower() !='agg':
62
+
use(old_backend, warn=switch_backend_warn)
63
+
64
+
returnsuccess
65
+
66
+
67
+
defknownfail(msg):
68
+
from .exceptionsimportKnownFailureTest
69
+
# Keep the next ultra-long comment so it shows in console.
70
+
raiseKnownFailureTest(msg) # An error here when running nose means that you don't have the matplotlib.testing.nose.plugins:KnownFailure plugin in use. # noqa
0 commit comments