      for key, value in state.items():
          setattr(settings, key, value)
  
  
  def django_tests(verbosity, interactive, failfast, keepdb, test_labels):
      state = setup(verbosity, test_labels)
      extra_tests = []
  
      # Run the test suite, including the extra validation tests.
      if not hasattr(settings, 'TEST_RUNNER'):
 
</s> remove             partition_suite(test, classes, bins)
 </s> add             partition_suite(test, classes, bins, reverse=reverse) </s> remove         return reorder_suite(suite, self.reorder_by)
 </s> add         return reorder_suite(suite, self.reorder_by, self.reverse)
def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels):
      for key, value in state.items():
          setattr(settings, key, value)
  
  
def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels):
      state = setup(verbosity, test_labels)
      extra_tests = []
  
      # Run the test suite, including the extra validation tests.
      if not hasattr(settings, 'TEST_RUNNER'):
keep keep keep keep replace 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. 
tests/runtests.py