Modernize the Review Board test runner, making it easier to use.

Review Request #7893 — Created Jan. 17, 2016 and submitted

Information

Review Board
release-2.0.x

Reviewers

The Review Board test runner is not easily discoverable. You have to
know about the manage.py script and the test management command, and you
have to know to put the -- separator in front of any testing arguments.

This change addresses this by introducing a tests/runtests.py script,
which matches the naming convention we have in Djblets, RBTools, and
other modules. This will run the test suite, passing any arguments over
to the management command in a more sane manner.

The defaults for the test run have also changed. We now use the nose
test IDs module, which gives us the ability to easily run failed tests
using --failed, or run specific tests by numeric ID.

The --with-profiling argument was removed, in favor of nose's
--with-profile, which is nicer to use anyway. The old argument is
removed, with an error indicating what to use instead.

All this gives us a standard that we can document.

Ran our test suite using both the original reviewboard/manage.py test
and the new tests/runtests.py. Verified that the original works the
way it did before (not counting the test ID/profiling changes), and the
new script runs without having to worry about using --, and from any
directory.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/manage.py
        reviewboard/test.py
        tests/runtests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/manage.py
        reviewboard/test.py
        tests/runtests.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (001415d)