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

Method test_missing_names

numpy/lib/tests/test__iotools.py:107–117  ·  view source on GitHub ↗

Test validate missing names

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

NameValidatorClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected