MCPcopy Index your code
hub / github.com/python/cpython / test_progress

Method test_progress

Lib/test/test_sqlite3/test_backup.py:66–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 self.verify_backup(bck)
65
66 def test_progress(self):
67 journal = []
68
69 def progress(status, remaining, total):
70 journal.append(status)
71
72 with memory_database() as bck:
73 self.cx.backup(bck, pages=1, progress=progress)
74 self.verify_backup(bck)
75
76 self.assertEqual(len(journal), 2)
77 self.assertEqual(journal[0], sqlite.SQLITE_OK)
78 self.assertEqual(journal[1], sqlite.SQLITE_DONE)
79
80 def test_progress_all_pages_at_once_1(self):
81 journal = []

Callers

nothing calls this directly

Calls 4

verify_backupMethod · 0.95
memory_databaseFunction · 0.85
backupMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected