()
| 143 | writer = asyncio.StreamWriter(transport, protocol, reader, self.loop) |
| 144 | |
| 145 | async def main(): |
| 146 | # writes data to transport |
| 147 | async def write(): |
| 148 | writer.write(data) |
| 149 | await writer.drain() |
| 150 | |
| 151 | # try to write for the first time |
| 152 | await write() |
| 153 | # try to write for the second time, this raises as the connection_lost |
| 154 | # callback should be done with error |
| 155 | with self.assertRaises(ConnectionResetError): |
| 156 | await write() |
| 157 | |
| 158 | self.loop.run_until_complete(main()) |
| 159 |
nothing calls this directly
no test coverage detected