feat: add manual disk discovery and weekly capacity cache
This commit is contained in:
@@ -6,7 +6,7 @@ from storage_cache import StorageCache
|
||||
|
||||
|
||||
class StorageTests(unittest.TestCase):
|
||||
def test_daily_reads_and_restart_cache(self):
|
||||
def test_weekly_reads_and_restart_cache(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
now=[1000];reads=[]
|
||||
def reader(path):
|
||||
@@ -18,7 +18,7 @@ class StorageTests(unittest.TestCase):
|
||||
self.assertEqual(len(reads),1)
|
||||
restored=StorageCache(p,reader,lambda:now[0]);restored.sample()
|
||||
self.assertEqual(len(reads),1)
|
||||
now[0]=87400;restored.sample()
|
||||
now[0]=605800;restored.sample()
|
||||
self.assertEqual(len(reads),2)
|
||||
|
||||
def test_failure_does_not_fabricate_zero_or_retry_each_second(self):
|
||||
|
||||
Reference in New Issue
Block a user