def test_close(fn): z = Zip(fn) z['x'] = b'123' z.close() zz = zipfile.ZipFile(fn, mode='r') assert zz.read('x') == b'123' with pytest.raises(IOError): z['y'] = b'123'
def test_close(fn): z = Zip(fn) z["x"] = b"123" z.close() zz = zipfile.ZipFile(fn, mode="r") assert zz.read("x") == b"123" with pytest.raises(IOError): z["y"] = b"123"