Running a single test case in the unittest suite
07 Oct 2020If your unit tests are written using the unittest
package, to run a single test case in the TestSuite, the command line syntax is
python setup.py test -m tests.test_module.TestClass.test_case
Stack Overflow reference: Does unittest allow single case/suite testing through “setup.py test”?
If your unit tests are written using pytest
, the command used would be
pytest tests/test_module.py::test_case