(self)
| 1356 | |
| 1357 | @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: True is not false |
| 1358 | def test_issue21872(self): |
| 1359 | # sometimes decompress data incompletely |
| 1360 | |
| 1361 | # --------------------- |
| 1362 | # when max_length == -1 |
| 1363 | # --------------------- |
| 1364 | d1 = LZMADecompressor() |
| 1365 | entire = d1.decompress(ISSUE_21872_DAT, max_length=-1) |
| 1366 | self.assertEqual(len(entire), 13160) |
| 1367 | self.assertTrue(d1.eof) |
| 1368 | |
| 1369 | # --------------------- |
| 1370 | # when max_length > 0 |
| 1371 | # --------------------- |
| 1372 | d2 = LZMADecompressor() |
| 1373 | |
| 1374 | # When this value of max_length is used, the input and output |
| 1375 | # buffers are exhausted at the same time, and lzs's internal |
| 1376 | # state still have 11 bytes can be output. |
| 1377 | out1 = d2.decompress(ISSUE_21872_DAT, max_length=13149) |
| 1378 | self.assertFalse(d2.needs_input) # ensure needs_input mechanism works |
| 1379 | self.assertFalse(d2.eof) |
| 1380 | |
| 1381 | # simulate needs_input mechanism |
| 1382 | # output internal state's 11 bytes |
| 1383 | out2 = d2.decompress(b'') |
| 1384 | self.assertEqual(len(out2), 11) |
| 1385 | self.assertTrue(d2.eof) |
| 1386 | self.assertEqual(out1 + out2, entire) |
| 1387 | |
| 1388 | def test_issue44439(self): |
| 1389 | q = array.array('Q', [1, 2, 3, 4, 5]) |
nothing calls this directly
no test coverage detected