예제 #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)
예제 #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)
예제 #3
0
 def test_from_empty_str_produces_empty_record(self):
     assert str(WheelRecord.from_str('')) == ''