MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_collection_set_array

Function test_collection_set_array

lib/matplotlib/tests/test_collections.py:898–911  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

896
897
898def test_collection_set_array():
899 vals = [*range(10)]
900
901 # Test set_array with list
902 c = Collection()
903 c.set_array(vals)
904
905 # Test set_array with wrong dtype
906 with pytest.raises(TypeError, match="^Image data of dtype"):
907 c.set_array("wrong_input")
908
909 # Test if array kwarg is copied
910 vals[5] = 45
911 assert np.not_equal(vals, c.get_array()).any()
912
913
914def test_blended_collection_autolim():

Callers

nothing calls this directly

Calls 3

CollectionClass · 0.90
get_arrayMethod · 0.80
set_arrayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…