Skip to content

Commit af56c13

Browse files
committed
MNT: More testing cleanups for coverage.
Remove unused code and restructure to eliminate uncovered lines.
1 parent ca858b7 commit af56c13

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

lib/matplotlib/tests/test_collections.py

-10
Original file line numberDiff line numberDiff line change
@@ -383,16 +383,6 @@ def check_segments(coll, positions, linelength, lineoffset, orientation):
383383
assert_equal(segment[1, pos2], positions[i])
384384

385385

386-
def check_allprop(values, target):
387-
'''
388-
check to make sure all values match the given target
389-
390-
note: this is not a test, it is used by tests
391-
'''
392-
for value in values:
393-
assert_equal(value, target)
394-
395-
396386
def check_allprop_array(values, target):
397387
'''
398388
check to make sure all values match the given target if arrays

lib/matplotlib/tests/test_triangulation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,8 @@ def test_triplot_return():
966966
triang = mtri.Triangulation(
967967
[0.0, 1.0, 0.0, 1.0], [0.0, 0.0, 1.0, 1.0],
968968
triangles=[[0, 1, 3], [3, 2, 0]])
969-
if ax.triplot(triang, "b-") is None:
970-
raise AssertionError("triplot should return the artist it adds")
969+
assert ax.triplot(triang, "b-") is not None, \
970+
'triplot should return the artist it adds'
971971

972972

973973
def test_trirefiner_fortran_contiguous_triangles():

lib/matplotlib/tests/test_widgets.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,7 @@ def test_CheckButtons():
261261
check.set_active(0)
262262
assert check.get_status() == [False, False, True]
263263

264-
def clicked_function():
265-
pass
266-
cid = check.on_clicked(clicked_function)
264+
cid = check.on_clicked(lambda: None)
267265
check.disconnect(cid)
268266

269267

0 commit comments

Comments
 (0)