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 bdd6d36

Browse filesBrowse files
committed
Avoid using deprecated API
1 parent 193e5a9 commit bdd6d36
Copy full SHA for bdd6d36

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-10
lines changed

‎lib/matplotlib/tests/test_triangulation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_triangulation.py
+5-10Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,8 +1350,7 @@ def test_tricontour_path():
13501350

13511351
# Line strip from boundary to boundary
13521352
cs = ax.tricontour(triang, [1, 0, 0, 0, 0], levels=[0.5])
1353-
assert len(cs.collections) == 1
1354-
paths = cs.collections[0].get_paths()
1353+
paths = cs.get_paths()
13551354
assert len(paths) == 1
13561355
expected_vertices = [[2, 0], [1, 1], [0, 2]]
13571356
assert_array_almost_equal(paths[0].vertices, expected_vertices)
@@ -1361,8 +1360,7 @@ def test_tricontour_path():
13611360

13621361
# Closed line loop inside domain
13631362
cs = ax.tricontour(triang, [0, 0, 0, 0, 1], levels=[0.5])
1364-
assert len(cs.collections) == 1
1365-
paths = cs.collections[0].get_paths()
1363+
paths = cs.get_paths()
13661364
assert len(paths) == 1
13671365
expected_vertices = [[3, 1], [3, 3], [1, 3], [1, 1], [3, 1]]
13681366
assert_array_almost_equal(paths[0].vertices, expected_vertices)
@@ -1378,8 +1376,7 @@ def test_tricontourf_path():
13781376

13791377
# Polygon inside domain
13801378
cs = ax.tricontourf(triang, [0, 0, 0, 0, 1], levels=[0.5, 1.5])
1381-
assert len(cs.collections) == 1
1382-
paths = cs.collections[0].get_paths()
1379+
paths = cs.get_paths()
13831380
assert len(paths) == 1
13841381
expected_vertices = [[3, 1], [3, 3], [1, 3], [1, 1], [3, 1]]
13851382
assert_array_almost_equal(paths[0].vertices, expected_vertices)
@@ -1388,8 +1385,7 @@ def test_tricontourf_path():
13881385

13891386
# Polygon following boundary and inside domain
13901387
cs = ax.tricontourf(triang, [1, 0, 0, 0, 0], levels=[0.5, 1.5])
1391-
assert len(cs.collections) == 1
1392-
paths = cs.collections[0].get_paths()
1388+
paths = cs.get_paths()
13931389
assert len(paths) == 1
13941390
expected_vertices = [[2, 0], [1, 1], [0, 2], [0, 0], [2, 0]]
13951391
assert_array_almost_equal(paths[0].vertices, expected_vertices)
@@ -1398,8 +1394,7 @@ def test_tricontourf_path():
13981394

13991395
# Polygon is outer boundary with hole
14001396
cs = ax.tricontourf(triang, [0, 0, 0, 0, 1], levels=[-0.5, 0.5])
1401-
assert len(cs.collections) == 1
1402-
paths = cs.collections[0].get_paths()
1397+
paths = cs.get_paths()
14031398
assert len(paths) == 1
14041399
expected_vertices = [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0],
14051400
[1, 1], [1, 3], [3, 3], [3, 1], [1, 1]]

0 commit comments

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