(self)
| 2383 | writer.close = lambda: None |
| 2384 | |
| 2385 | def test_isatty(self): |
| 2386 | class SelectableIsAtty(MockRawIO): |
| 2387 | def __init__(self, isatty): |
| 2388 | MockRawIO.__init__(self) |
| 2389 | self._isatty = isatty |
| 2390 | |
| 2391 | def isatty(self): |
| 2392 | return self._isatty |
| 2393 | |
| 2394 | pair = self.tp(SelectableIsAtty(False), SelectableIsAtty(False)) |
| 2395 | self.assertFalse(pair.isatty()) |
| 2396 | |
| 2397 | pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(False)) |
| 2398 | self.assertTrue(pair.isatty()) |
| 2399 | |
| 2400 | pair = self.tp(SelectableIsAtty(False), SelectableIsAtty(True)) |
| 2401 | self.assertTrue(pair.isatty()) |
| 2402 | |
| 2403 | pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(True)) |
| 2404 | self.assertTrue(pair.isatty()) |
| 2405 | |
| 2406 | def test_weakref_clearing(self): |
| 2407 | brw = self.tp(self.MockRawIO(), self.MockRawIO()) |
nothing calls this directly
no test coverage detected