From 344b1b8366f74538f650307ab0d29dae19697f1e Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Tue, 30 Jan 2018 10:50:39 +0530 Subject: [PATCH] HACKING: Commands to run a single test method, class or module Signed-off-by: Joseph Nuthalapati --- HACKING.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/HACKING.md b/HACKING.md index 3df6ecb81..238e1f9f9 100644 --- a/HACKING.md +++ b/HACKING.md @@ -97,12 +97,27 @@ However, for some reason, you wish setup manually, the following tips will help: ## Running Tests -To run tests: +To run all the tests: -``` +```bash $ python3 setup.py test ``` +To run a specific test function, test class or test module, use the `-s` option with the fully qualified name. + +**Examples:** + +```bash +# Run tests of a test module +$ python3 setup.py test -s plinth.tests.test_actions + +# Run tests of one class in test module +$ python3 setup.py test -s plinth.tests.test_actions.TestActions + +# Run one test in a class or module +$ python3 setup.py test -s plinth.tests.test_actions.TestActions.test_is_package_manager_busy +``` + ## Running the Test Coverage Analysis To run the coverage tool: