(self)
| 220 | t.__init__(b, encoding="utf-8", newline='xyzzy') |
| 221 | |
| 222 | def test_uninitialized(self): |
| 223 | t = self.TextIOWrapper.__new__(self.TextIOWrapper) |
| 224 | del t |
| 225 | t = self.TextIOWrapper.__new__(self.TextIOWrapper) |
| 226 | self.assertRaises(Exception, repr, t) |
| 227 | self.assertRaisesRegex((ValueError, AttributeError), |
| 228 | 'uninitialized|has no attribute', |
| 229 | t.read, 0) |
| 230 | t.__init__(self.MockRawIO(), encoding="utf-8") |
| 231 | self.assertEqual(t.read(0), '') |
| 232 | |
| 233 | def test_non_text_encoding_codecs_are_rejected(self): |
| 234 | # Ensure the constructor complains if passed a codec that isn't |
nothing calls this directly
no test coverage detected