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

Method test_missing

numpy/lib/tests/test__iotools.py:191–203  ·  view source on GitHub ↗

Tests the use of missing values.

(self)

Source from the content-addressed store, hash-verified

189 assert_equal(converter._status, 8 + status_offset)
190
191 def test_missing(self):
192 "Tests the use of missing values."
193 converter = StringConverter(missing_values=('missing',
194 'missed'))
195 converter.upgrade('0')
196 assert_equal(converter('0'), 0)
197 assert_equal(converter(''), converter.default)
198 assert_equal(converter('missing'), converter.default)
199 assert_equal(converter('missed'), converter.default)
200 try:
201 converter('miss')
202 except ValueError:
203 pass
204
205 @pytest.mark.thread_unsafe(reason="monkeypatches StringConverter")
206 def test_upgrademapper(self):

Callers

nothing calls this directly

Calls 3

upgradeMethod · 0.95
StringConverterClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected