Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee26c7c

Browse files
committed
TST: do not do import in finally block
This works around a cpython bug (https://bugs.python.org/issue31286)
1 parent 64a7bd5 commit ee26c7c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/matplotlib/testing/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def mpl_test_settings(request):
4949
yield
5050
finally:
5151
if backend is not None:
52-
import matplotlib.pyplot as plt
5352
plt.switch_backend(prev_backend)
5453
_do_cleanup(original_units_registry,
5554
original_settings)

0 commit comments

Comments
 (0)