From e980f8b296565e0eb46ac9d883a135f1b45817c8 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Sun, 12 Aug 2012 16:59:07 -0400 Subject: [PATCH] add notes on how to run individual tests --- doc/development.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/doc/development.md b/doc/development.md index 9d6628732a..44965cb0de 100644 --- a/doc/development.md +++ b/doc/development.md @@ -34,12 +34,34 @@ This will import all courses in your data directory into mongodb This runs all the tests (long, uses collectstatic): rake test - + +If if you aren't changing static files, can run `rake test` once, then run + + rake fasttest_{lms,cms} + xmodule can be tested independently, with this: rake test_common/lib/xmodule - + To see all available rake commands, do this: rake -T - \ No newline at end of file + +To run a single django test class: + + django-admin.py test --settings=lms.envs.test --pythonpath=. lms/djangoapps/courseware/tests/tests.py:TestViewAuth + +To run a single django test: + + django-admin.py test --settings=lms.envs.test --pythonpath=. lms/djangoapps/courseware/tests/tests.py:TestViewAuth.test_dark_launch + + +To run a single nose test file: + + nosetests common/lib/xmodule/xmodule/tests/test_stringify.py + +To run a single nose test: + + nosetests common/lib/xmodule/xmodule/tests/test_stringify.py:test_stringify + +