Fix failing test

We cant know what the size of the disk cache file is,
since defragmentation occurs asynchronously
This commit is contained in:
Kovid Goyal 2021-01-03 21:05:08 +05:30
parent 1b59a1c421
commit ac13ae727f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -216,10 +216,10 @@ class TestGraphics(BaseTest):
while dc.total_size > before // 3:
key = random.choice(tuple(data))
self.assertTrue(remove(key))
check_data()
add('trigger defrag', 'XXX')
dc.wait_for_write()
self.assertLess(dc.size_on_disk(), before)
self.assertEqual(dc.size_on_disk(), sum(map(len, data.values())))
check_data()
def test_load_images(self):