MCPcopy Index your code
hub / github.com/numpy/numpy / test_missing_names

Method test_missing_names

numpy/lib/tests/test__iotools.py:111–121  ·  view source on GitHub ↗

Test validate missing names

(self)

Source from the content-addressed store, hash-verified

109 assert_equal(test, ['dates_', 'data_', 'Other_Data', 'mask_'])
110
111 def test_missing_names(self):
112 "Test validate missing names"
113 namelist = ('a', 'b', 'c')
114 validator = NameValidator()
115 assert_equal(validator(namelist), ['a', 'b', 'c'])
116 namelist = ('', 'b', 'c')
117 assert_equal(validator(namelist), ['f0', 'b', 'c'])
118 namelist = ('a', 'b', '')
119 assert_equal(validator(namelist), ['a', 'b', 'f0'])
120 namelist = ('', 'f0', '')
121 assert_equal(validator(namelist), ['f1', 'f0', 'f2'])
122
123 def test_validate_nb_names(self):
124 "Test validate nb names"

Callers

nothing calls this directly

Calls 2

NameValidatorClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected