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

Method test_missing

numpy/lib/tests/test__iotools.py:187–199  ·  view source on GitHub ↗

Tests the use of missing values.

(self)

Source from the content-addressed store, hash-verified

185 assert_equal(converter._status, 8 + status_offset)
186
187 def test_missing(self):
188 "Tests the use of missing values."
189 converter = StringConverter(missing_values=('missing',
190 'missed'))
191 converter.upgrade('0')
192 assert_equal(converter('0'), 0)
193 assert_equal(converter(''), converter.default)
194 assert_equal(converter('missing'), converter.default)
195 assert_equal(converter('missed'), converter.default)
196 try:
197 converter('miss')
198 except ValueError:
199 pass
200
201 def test_upgrademapper(self):
202 "Tests updatemapper"

Callers

nothing calls this directly

Calls 3

upgradeMethod · 0.95
StringConverterClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected