Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7c06c7f

Browse filesBrowse files
committed
Don't use pytest.filterwarings, which needs pytest>=3.2.
We document pytest>=3.0 and it's easy enough to replace.
1 parent 89183ba commit 7c06c7f
Copy full SHA for 7c06c7f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎lib/matplotlib/tests/test_image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_image.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,12 @@ def test_imshow_flatfield():
806806
colors.LogNorm,
807807
lambda: colors.SymLogNorm(1),
808808
lambda: colors.PowerNorm(1)])
809-
@pytest.mark.filterwarnings("ignore:Attempting to set identical left==right")
810809
def test_empty_imshow(make_norm):
811810
fig, ax = plt.subplots()
812-
im = ax.imshow([[]], norm=make_norm())
811+
with warnings.catch_warnings():
812+
warnings.filterwarnings(
813+
"ignore", "Attempting to set identical left==right")
814+
im = ax.imshow([[]], norm=make_norm())
813815
im.set_extent([-5, 5, -5, 5])
814816
fig.canvas.draw()
815817

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.