Skip to content

Commit 30caf00

Browse files
committed
Filter tests leaked from imported pylab in test_basic
1 parent 8b64294 commit 30caf00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_basic.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
from pylab import *
1010

1111

12+
# Filter any tests that can leak from importing pylab
13+
for varname in globals().keys():
14+
if varname == 'test' or \
15+
varname.startswith('Test') or \
16+
varname.startswith('test_'):
17+
del globals()[varname]
18+
19+
1220
def test_simple():
1321
assert_equal(1 + 1, 2)
1422

0 commit comments

Comments
 (0)