()
| 51 | |
| 52 | |
| 53 | def test_gunzip_illegal_eof(): |
| 54 | text = html_to_unicode( |
| 55 | "charset=cp1252", gunzip((SAMPLEDIR / "unexpected-eof.gz").read_bytes()) |
| 56 | )[1] |
| 57 | expected_text = (SAMPLEDIR / "unexpected-eof-output.txt").read_text( |
| 58 | encoding="utf-8" |
| 59 | ) |
| 60 | assert len(text) == len(expected_text) |
| 61 | assert text == expected_text |