Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7d25ee8 + 360b8c0 commit 771707fCopy full SHA for 771707f
lib/matplotlib/testing/decorators.py
@@ -12,7 +12,10 @@
12
import warnings
13
import unittest
14
15
-import nose
+# Note - don't import nose up here - import it only as needed in functions. This
16
+# allows other functions here to be used by pytest-based testing suites without
17
+# requiring nose to be installed.
18
+
19
import numpy as np
20
21
import matplotlib as mpl
@@ -417,6 +420,9 @@ def find_dotted_module(module_name, path=None):
417
420
418
421
419
422
def switch_backend(backend):
423
+ # Local import to avoid a hard nose dependency and only incur the
424
+ # import time overhead at actual test-time.
425
+ import nose
426
def switch_backend_decorator(func):
427
def backend_switcher(*args, **kwargs):
428
try:
0 commit comments