MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_badbom

Method test_badbom

Lib/test/test_codecs.py:667–674  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

665 self.assertEqual(f.read(), "spamspam")
666
667 def test_badbom(self):
668 s = io.BytesIO(b"\xff\xff")
669 f = codecs.getreader(self.encoding)(s)
670 self.assertRaises(UnicodeDecodeError, f.read)
671
672 s = io.BytesIO(b"\xff\xff\xff\xff")
673 f = codecs.getreader(self.encoding)(s)
674 self.assertRaises(UnicodeDecodeError, f.read)
675
676 def test_partial(self):
677 self.check_partial(

Callers

nothing calls this directly

Calls 2

getreaderMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected