How to run individual tests in python

published Aug 15, 2015 02:40   by admin ( last modified Sep 01, 2015 11:42 )

Tested by me.

You specify the path to the file where the tests are residing. After the path you add a string that specifies the place of the test inside that file, in dotted format:

python <path_to_file> <class_name>.<test_method_name>
python testMyCase.py MyCase.testItIsHot


Read more: Link - python - Running single test from unittest.TestCase via command line - Stack Overflow