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

Function test_validator_valid

lib/matplotlib/tests/test_rcparams.py:448–456  ·  view source on GitHub ↗
(validator, arg, target)

Source from the content-addressed store, hash-verified

446@pytest.mark.parametrize('validator, arg, target',
447 generate_validator_testcases(True))
448def test_validator_valid(validator, arg, target):
449 res = validator(arg)
450 if isinstance(target, np.ndarray):
451 np.testing.assert_equal(res, target)
452 elif not isinstance(target, Cycler):
453 assert res == target
454 else:
455 # Cyclers can't simply be asserted equal. They don't implement __eq__
456 assert list(res) == list(target)
457
458
459@pytest.mark.parametrize('validator, arg, exception_type',

Callers

nothing calls this directly

Calls 1

validatorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…