          paired_tests(options.pair, options, options.modules)
      else:
          failures = django_tests(options.verbosity, options.interactive,
                                  options.failfast, options.keepdb,
                                  options.modules)
          if failures:
              sys.exit(bool(failures))
 
</s> remove             partition_suite(test, classes, bins)
 </s> add             partition_suite(test, classes, bins, reverse=reverse) </s> remove def django_tests(verbosity, interactive, failfast, keepdb, test_labels):
 </s> add def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels): </s> remove                  verbosity=1, interactive=True, failfast=False, keepdb=False,
 </s> add                  verbosity=1, interactive=True, failfast=False, keepdb=False, reverse=False,
                                options.reverse, options.modules)
          paired_tests(options.pair, options, options.modules)
      else:
          failures = django_tests(options.verbosity, options.interactive,
                                  options.failfast, options.keepdb,
                                options.reverse, options.modules)
          if failures:
              sys.exit(bool(failures))
keep keep keep keep replace 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