Exemple #1
0
 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)
Exemple #2
0
 def test_from_str_throws_on_directory_entry(self):
     with pytest.raises(RecordContainsDirectoryError):
         record_str = "./,sha256=whatever,0"
         WheelRecord.from_str(record_str)
Exemple #3
0
 def test_from_empty_str_produces_empty_record(self):
     assert str(WheelRecord.from_str('')) == ''