From 062696d31cc21e37b44e8c23e40ece9076cc22e5 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 5 Nov 2026 14:03:47 +0100 Subject: Fix: Restoring a state file doubled every completed count --- tests/integration/test_statefile.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/integration') diff --git a/tests/integration/test_statefile.py b/tests/integration/test_statefile.py index 2a2d147..9f6db01 100644 --- a/tests/integration/test_statefile.py +++ b/tests/integration/test_statefile.py @@ -30,6 +30,7 @@ class StateFileRoundTrip(TrackerTestCase): files = restarted.scrape(info_hash)[b"files"] self.assertIn(info_hash, files, "the torrent did not survive the restart") entry = files[info_hash] + self.assertEqual(entry[b"downloaded"], 1, "the completed count did not survive") self.assertEqual(entry[b"complete"], 0, "no peers are carried over, only the torrent") self.assertEqual(entry[b"incomplete"], 0) complaints = restarted.stop() -- cgit v1.3