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

Method test_encoding

numpy/lib/tests/test_io.py:668–673  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

666 self.check_compressed(lzma.open, ('.xz', '.lzma'))
667
668 def test_encoding(self):
669 with temppath() as path:
670 with open(path, "wb") as f:
671 f.write('0.\n1.\n2.'.encode("UTF-16"))
672 x = self.loadfunc(path, encoding="UTF-16")
673 assert_array_equal(x, [0., 1., 2.])
674
675 def test_stringload(self):
676 # umlaute

Callers

nothing calls this directly

Calls 5

temppathFunction · 0.90
assert_array_equalFunction · 0.90
openFunction · 0.85
encodeMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected