Load the summary asynchronously for quick startup.
- Interface starts before loading begins. - Split out summary info into separate storage. - Fixed iteration of PagedList. - Not saving partially loaded summary during load.
This commit is contained in:
parent
c9376e2bd3
commit
2704ccc9c3
5 changed files with 103 additions and 52 deletions
|
|
@ -159,7 +159,7 @@ class SummarySyncWithFilesystemTestCase(unittest.TestCase):
|
|||
self.assertEqual(self.summary.completed_total, completed_total)
|
||||
self.assertEqual(self.summary.result_total, result_total)
|
||||
max_width = max((len(row) for row in self.summary._entries), default=0)
|
||||
self.assertEqual(self.summary._max_width, max_width)
|
||||
self.assertEqual(__main__.Entry.MAX_WIDTH, max_width)
|
||||
max_path_length = max(
|
||||
(len(row.path) - 2 for row in self.summary._entries), default=0)
|
||||
self.assertEqual(self.summary._max_path_length, max_path_length)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ class PagedListTestCase(unittest.TestCase):
|
|||
self.assertEqual(list_[1:5], [4, 5, 6, 7])
|
||||
self.assertEqual(list_[:2], [3, 4])
|
||||
self.assertEqual(list_[2:], [5, 6, 7, 8])
|
||||
self.assertEqual(list(list_), [3, 4, 5, 6, 7, 8])
|
||||
self.assertRaises(IndexError, list_.__getitem__, 6)
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
list_ = paged_list.PagedList([], temp_dir, 2, 2)
|
||||
self.assertRaises(IndexError, list_.__getitem__, 0)
|
||||
# self.assertEqual(list_[3:4], []) FIX
|
||||
|
||||
def test_pickling(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue