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.
1 parent edccefa commit 48dedc4Copy full SHA for 48dedc4
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
@@ -412,6 +415,9 @@ def find_dotted_module(module_name, path=None):
412
415
413
416
414
417
def switch_backend(backend):
418
+ # Local import to avoid a hard nose dependency and only incur the
419
+ # import time overhead at actual test-time.
420
+ import nose
421
def switch_backend_decorator(func):
422
def backend_switcher(*args, **kwargs):
423
try:
0 commit comments