From 52c0767e15fdb3da800820f83dfc1fdb582f26c0 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 12 2017 12:55:25 +0000 Subject: Document how to run a single test file or even a single test in a file Fixes https://pagure.io/pagure/issue/2640 Signed-off-by: Pierre-Yves Chibon --- diff --git a/doc/development.rst b/doc/development.rst index bb0e806..8b7eac4 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -287,6 +287,24 @@ by alone, allowing easier debugging of the tests. For example: python tests/test_pagure_lib.py +or using: + +:: + + ./runtests.sh tests/test_pagure_lib.py + +If you with to run a single test, you can use the following structure: + +:: + + ./runtests.sh :ClassName.method + +For example: + +:: + + ./runtests.sh tests/test_pagure_lib.py:PagureLibtests_search_user.test_search_user_username + .. note:: In order to have coverage information you might have to install ``python-coverage``