MCPcopy Index your code
hub / github.com/RustPython/RustPython / testClosedIteratorDeadlock

Method testClosedIteratorDeadlock

Lib/test/test_bz2.py:238–245  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

236 self.assertEqual(list(iter(bz2f)), self.TEXT_LINES * 5)
237
238 def testClosedIteratorDeadlock(self):
239 # Issue #3309: Iteration on a closed BZ2File should release the lock.
240 self.createTempFile()
241 bz2f = BZ2File(self.filename)
242 bz2f.close()
243 self.assertRaises(ValueError, next, bz2f)
244 # This call will deadlock if the above call failed to release the lock.
245 self.assertRaises(ValueError, bz2f.readlines)
246
247 def testWrite(self):
248 with BZ2File(self.filename, "w") as bz2f:

Callers

nothing calls this directly

Calls 4

createTempFileMethod · 0.95
closeMethod · 0.95
BZ2FileClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected