(self)
| 2326 | class BytecodeTests(InstructionTestCase, DisTestBase): |
| 2327 | |
| 2328 | def test_instantiation(self): |
| 2329 | # Test with function, method, code string and code object |
| 2330 | for obj in [_f, _C(1).__init__, "a=1", _f.__code__]: |
| 2331 | with self.subTest(obj=obj): |
| 2332 | b = dis.Bytecode(obj) |
| 2333 | self.assertIsInstance(b.codeobj, types.CodeType) |
| 2334 | |
| 2335 | self.assertRaises(TypeError, dis.Bytecode, object()) |
| 2336 | |
| 2337 | def test_iteration(self): |
| 2338 | for obj in [_f, _C(1).__init__, "a=1", _f.__code__]: |
nothing calls this directly
no test coverage detected