MCPcopy Index your code
hub / github.com/python/cpython / test_unknown_opcode_without_pos

Method test_unknown_opcode_without_pos

Lib/test/test_pickletools.py:153–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

151 next(it)
152
153 def test_unknown_opcode_without_pos(self):
154 f = SimpleReader(b'N\xff')
155 it = pickletools.genops(f)
156 item = next(it)
157 self.assertEqual(item[0].name, 'NONE')
158 with self.assertRaisesRegex(ValueError,
159 r"at position <unknown>, opcode b'\\xff' unknown"):
160 next(it)
161
162
163class DisTests(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

assertRaisesRegexMethod · 0.80
SimpleReaderClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected