  
      All tests of type classes[0] are placed first, then tests of type
      classes[1], etc. Tests with no match in classes are placed last.
      """
      class_count = len(classes)
      suite_class = type(suite)
      bins = [suite_class() for i in range(class_count + 1)]
      partition_suite(suite, classes, bins, reverse=reverse)
 
</s> remove     partition_suite(suite, classes, bins)
 </s> add     partition_suite(suite, classes, bins, reverse=reverse) </s> remove             partition_suite(test, classes, bins)
 </s> add             partition_suite(test, classes, bins, reverse=reverse) </s> remove def partition_suite(suite, classes, bins):
 </s> add def partition_suite(suite, classes, bins, reverse=False):
    If `reverse` is True, tests within classes are sorted in opposite order,
    but test classes are not reversed.
  
      All tests of type classes[0] are placed first, then tests of type
      classes[1], etc. Tests with no match in classes are placed last.
    If `reverse` is True, tests within classes are sorted in opposite order,
    but test classes are not reversed.
      """
      class_count = len(classes)
      suite_class = type(suite)
      bins = [suite_class() for i in range(class_count + 1)]
      partition_suite(suite, classes, bins, reverse=reverse)
keep keep add keep keep keep keep keep
 Fixed #23742 -- Added an option to reverse tests order.

This is useful for debugging side effects affecting tests that
are usually executed before a given test. Full suite and pair
tests sort cases more or less deterministically, thus some test
cross-dependencies are easier to reveal by reversing the order.

Thanks Preston Timmons for the review. 
django/test/runner.py