From b19041927883123e0147d80b820ddabee9a716f6 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Thu, 4 Mar 2021 22:28:37 -0800 Subject: [PATCH] Simplified for loop in reorder_suite(). --- django/test/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/test/runner.py b/django/test/runner.py index ff646b7692..db7628df4c 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -784,8 +784,8 @@ def reorder_suite(suite, classes, reverse=False): bins = [OrderedSet() for i in range(class_count + 1)] partition_suite_by_type(suite, classes, bins, reverse=reverse) reordered_suite = suite_class() - for i in range(class_count + 1): - reordered_suite.addTests(bins[i]) + for tests in bins: + reordered_suite.addTests(tests) return reordered_suite