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 4cd420f

Browse filesBrowse files
committed
FIX: get tests working
1 parent cad9549 commit 4cd420f
Copy full SHA for 4cd420f

File tree

Expand file treeCollapse file tree

2 files changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-3
lines changed

‎lib/matplotlib/tests/test_collections.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_collections.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ def test_EllipseCollection():
382382

383383
@image_comparison(['polycollection_close.png'], remove_text=True)
384384
def test_polycollection_close():
385+
from mpl_toolkits.mplot3d import Axes3D
385386

386387
vertsQuad = [
387388
[[0., 0.], [0., 1.], [1., 1.], [1., 0.]],
@@ -390,7 +391,7 @@ def test_polycollection_close():
390391
[[3., 0.], [3., 1.], [4., 1.], [4., 0.]]]
391392

392393
fig = plt.figure()
393-
ax = fig.add_subplot(projection='3d')
394+
ax = fig.add_axes(Axes3D(fig, add=False))
394395

395396
colors = ['r', 'g', 'b', 'y', 'k']
396397
zpos = list(range(5))

‎lib/mpl_toolkits/tests/test_mplot3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/tests/test_mplot3d.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import pytest
55

6-
from mpl_toolkits.mplot3d import axes3d, proj3d, art3d
6+
from mpl_toolkits.mplot3d import Axes3D, axes3d, proj3d, art3d
77
import matplotlib as mpl
88
from matplotlib.backend_bases import MouseButton
99
from matplotlib import cm
@@ -702,7 +702,8 @@ def test_add_collection3d_zs_scalar():
702702
@mpl3d_image_comparison(['axes3d_labelpad.png'], remove_text=False)
703703
def test_axes3d_labelpad():
704704
fig = plt.figure()
705-
ax = fig.add_subplot(projection='3d')
705+
ax = Axes3D(fig, add=False)
706+
fig.add_axes(ax)
706707
# labelpad respects rcParams
707708
assert ax.xaxis.labelpad == mpl.rcParams['axes.labelpad']
708709
# labelpad can be set in set_label

0 commit comments

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