(self)
| 868 | |
| 869 | @support.cpython_only |
| 870 | def test_sizeof(self): |
| 871 | basesize = support.calcobjsize('P2n2Pn') |
| 872 | check = self.check_sizeof |
| 873 | self.assertEqual(object.__sizeof__(io.BytesIO()), basesize) |
| 874 | check(io.BytesIO(), basesize ) |
| 875 | n = 1000 # use a variable to prevent constant folding |
| 876 | check(io.BytesIO(b'a' * n), basesize + sys.getsizeof(b'a' * n)) |
| 877 | |
| 878 | # Various tests of copy-on-write behaviour for BytesIO. |
| 879 |
nothing calls this directly
no test coverage detected