def test_stringification_is_stable(self): wr = WheelRecord() buf = BytesIO(bytes(1000)) wr.update('file', buf) assert str(WheelRecord.from_str(str(wr))) == str(wr)
def test_from_str_throws_on_directory_entry(self): with pytest.raises(RecordContainsDirectoryError): record_str = "./,sha256=whatever,0" WheelRecord.from_str(record_str)
def test_from_empty_str_produces_empty_record(self): assert str(WheelRecord.from_str('')) == ''