def test_zip(): with open(datadir + os.sep + 'one-file.tnef', "rb") as tfile: zip_data = to_zip(tfile.read()) with tempfile.TemporaryFile() as out: out.write(zip_data)
def test_zip(tmp_path): # remove this test once tnef.to_zip(bytes) is no longer supported with pytest.deprecated_call(): zip_data = to_zip((DATADIR / "one-file.tnef").read_bytes()) (tmp_path / "output").write_bytes(zip_data)
def test_zip(): # remove this test once tnef.to_zip(bytes) is no longer supported with open(datadir + os.sep + 'one-file.tnef', "rb") as tfile: zip_data = to_zip(tfile.read()) with tempfile.TemporaryFile() as out: out.write(zip_data)