MCPcopy Create free account
hub / github.com/numpy/numpy / test_validate_nb_names

Method test_validate_nb_names

numpy/lib/tests/test__iotools.py:119–125  ·  view source on GitHub ↗

Test validate nb names

(self)

Source from the content-addressed store, hash-verified

117 assert_equal(validator(namelist), ['f1', 'f0', 'f2'])
118
119 def test_validate_nb_names(self):
120 "Test validate nb names"
121 namelist = ('a', 'b', 'c')
122 validator = NameValidator()
123 assert_equal(validator(namelist, nbfields=1), ('a',))
124 assert_equal(validator(namelist, nbfields=5, defaultfmt="g%i"),
125 ['a', 'b', 'c', 'g0', 'g1'])
126
127 def test_validate_wo_names(self):
128 "Test validate no names"

Callers

nothing calls this directly

Calls 2

NameValidatorClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected