Skip to content

Commit a6ca70d

Browse files
committed
Remove all @cleanup decorator applications.
1 parent 47e6693 commit a6ca70d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+34
-312
lines changed

lib/matplotlib/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,6 @@ def _jupyter_nbextension_paths():
14761476
default_test_modules = [
14771477
'matplotlib.tests.test_png',
14781478
'matplotlib.tests.test_units',
1479-
'matplotlib.tests.test_widgets',
14801479
]
14811480

14821481

lib/matplotlib/tests/test_agg.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
from matplotlib.image import imread
1212
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
1313
from matplotlib.figure import Figure
14-
from matplotlib.testing.decorators import cleanup, image_comparison
14+
from matplotlib.testing.decorators import image_comparison
1515
from matplotlib import pyplot as plt
1616
from matplotlib import collections
1717
from matplotlib import path
1818
from matplotlib import transforms as mtransforms
1919

2020

21-
@cleanup
2221
def test_repeated_save_with_alpha():
2322
# We want an image which has a background color of bluish green, with an
2423
# alpha of 0.25.
@@ -51,7 +50,6 @@ def test_repeated_save_with_alpha():
5150
decimal=3)
5251

5352

54-
@cleanup
5553
def test_large_single_path_collection():
5654
buff = io.BytesIO()
5755

@@ -66,7 +64,6 @@ def test_large_single_path_collection():
6664
plt.savefig(buff)
6765

6866

69-
@cleanup
7067
def test_marker_with_nan():
7168
# This creates a marker with nans in it, which was segfaulting the
7269
# Agg backend (see #3722)
@@ -79,7 +76,6 @@ def test_marker_with_nan():
7976
fig.savefig(buf, format='png')
8077

8178

82-
@cleanup
8379
def test_long_path():
8480
buff = io.BytesIO()
8581

@@ -218,7 +214,6 @@ def process_image(self, padded_src, dpi):
218214
ax.yaxis.set_visible(False)
219215

220216

221-
@cleanup
222217
def test_too_large_image():
223218
fig = plt.figure(figsize=(300, 1000))
224219
buff = io.BytesIO()

lib/matplotlib/tests/test_animation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import matplotlib as mpl
1414
from matplotlib import pyplot as plt
1515
from matplotlib import animation
16-
from matplotlib.testing.decorators import cleanup
1716

1817

1918
class NullMovieWriter(animation.AbstractMovieWriter):
@@ -109,7 +108,6 @@ def isAvailable(self):
109108
# Smoke test for saving animations. In the future, we should probably
110109
# design more sophisticated tests which compare resulting frames a-la
111110
# matplotlib.testing.image_comparison
112-
@cleanup
113111
@pytest.mark.parametrize('writer, extension', WRITER_OUTPUT)
114112
def test_save_animation_smoketest(tmpdir, writer, extension):
115113
try:
@@ -148,7 +146,6 @@ def animate(i):
148146
"see issues #1891 and #2679")
149147

150148

151-
@cleanup
152149
def test_no_length_frames():
153150
fig, ax = plt.subplots()
154151
line, = ax.plot([], [])

lib/matplotlib/tests/test_artist.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
import matplotlib.transforms as mtrans
1515
import matplotlib.collections as mcollections
1616
import matplotlib.artist as martist
17-
from matplotlib.testing.decorators import image_comparison, cleanup
17+
from matplotlib.testing.decorators import image_comparison
1818

1919

20-
@cleanup
2120
def test_patch_transform_of_none():
2221
# tests the behaviour of patches added to an Axes with various transform
2322
# specifications
@@ -60,7 +59,6 @@ def test_patch_transform_of_none():
6059
assert e._transform == ax.transData
6160

6261

63-
@cleanup
6462
def test_collection_transform_of_none():
6563
# tests the behaviour of collections added to an Axes with various
6664
# transform specifications
@@ -127,7 +125,6 @@ def test_clipping():
127125
ax1.set_ylim([-3, 3])
128126

129127

130-
@cleanup
131128
def test_cull_markers():
132129
x = np.random.random(20000)
133130
y = np.random.random(20000)
@@ -175,7 +172,6 @@ def test_hatching():
175172
ax.set_ylim(0, 9)
176173

177174

178-
@cleanup
179175
def test_remove():
180176
fig, ax = plt.subplots()
181177
im = ax.imshow(np.arange(36).reshape(6, 6))
@@ -224,7 +220,6 @@ def test_default_edges():
224220
ax4.add_patch(pp1)
225221

226222

227-
@cleanup
228223
def test_properties():
229224
ln = mlines.Line2D([], [])
230225
with warnings.catch_warnings(record=True) as w:
@@ -234,7 +229,6 @@ def test_properties():
234229
assert len(w) == 0
235230

236231

237-
@cleanup
238232
def test_setp():
239233
# Check empty list
240234
plt.setp([])

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy