Commit 2cc793c8 by Calen Pennington

Teach rake to run all python tests as a group

parent 02d8b68a
......@@ -86,10 +86,12 @@ because the `capa` package handles problem XML.
# Running Tests
Before running tests, ensure that you have all the dependencies. You can install dependencies using:
You can run all of the unit-level tests using the command
rake install_prereqs
rake test
This includes python, javascript, and documentation tests. It does not, however,
run any acceptance tests.
## Running Python Unit tests
......@@ -97,15 +99,15 @@ We use [nose](https://nose.readthedocs.org/en/latest/) through
the [django-nose plugin](https://pypi.python.org/pypi/django-nose)
to run the test suite.
You can run tests using `rake` commands. For example,
You can run all the python tests using `rake` commands. For example,
rake test
rake test:python
runs all the tests. It also runs `collectstatic`, which prepares the static files used by the site (for example, compiling Coffeescript to Javascript).
You can re-run all failed python tests by running (all JS tests will still run)
You can re-run all failed python tests by running
rake test[--failed]
rake test:python[--failed]
You can also run the tests without `collectstatic`, which tends to be faster:
......
......@@ -159,11 +159,16 @@ TEST_TASK_DIRS.each do |dir|
report_dir = report_dir_path(dir)
directory report_dir
task :report_dirs => [REPORT_DIR, report_dir]
task :test => "test_#{dir}"
task 'test:python' => "test_#{dir}"
end
namespace :test do
desc "Run all python tests"
task :python, [:test_id]
end
desc "Run all tests"
task :test, [:test_id] => :test_docs
task :test, [:test_id] => [:test_docs, 'test:python']
desc "Build the html, xml, and diff coverage reports"
task :coverage => :report_dirs do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment