(self)
| 246 | self.assertEqual(list(iter(bz2f)), self.TEXT_LINES * 5) |
| 247 | |
| 248 | def testClosedIteratorDeadlock(self): |
| 249 | # Issue #3309: Iteration on a closed BZ2File should release the lock. |
| 250 | self.createTempFile() |
| 251 | bz2f = BZ2File(self.filename) |
| 252 | bz2f.close() |
| 253 | self.assertRaises(ValueError, next, bz2f) |
| 254 | # This call will deadlock if the above call failed to release the lock. |
| 255 | self.assertRaises(ValueError, bz2f.readlines) |
| 256 | |
| 257 | def testWrite(self): |
| 258 | with BZ2File(self.filename, "w") as bz2f: |
nothing calls this directly
no test coverage detected