(self)
| 3498 | self.assertEqual(y.foo, 42) |
| 3499 | |
| 3500 | def test_newobj_not_class(self): |
| 3501 | # Issue 24552 |
| 3502 | if self.py_version < (3, 4): |
| 3503 | self.skipTest('not supported in Python < 3.4') |
| 3504 | o = SimpleNewObj.__new__(SimpleNewObj) |
| 3505 | b = self.dumps(o, 4) |
| 3506 | with support.swap_attr(picklecommon, 'SimpleNewObj', 42): |
| 3507 | self.assertRaises((TypeError, pickle.UnpicklingError), self.loads, b) |
| 3508 | |
| 3509 | # Register a type with copyreg, with extension code extcode. Pickle |
| 3510 | # an object of that type. Check that the resulting pickle uses opcode |
nothing calls this directly
no test coverage detected