I’ve got the test code from my unittest fixture syntax and flow reference, and I want to try to run one class, say TestSkip
from unittest and pytest to compare the the control flow.
Therefore, I need for each framework:
- The option to make it as quiet as possible
- -q for both unittest and pytest
- The option to turn off output capture
- -s works for pytest, not needed for unittest
- The way to call an individual class
- details below
- note that moduleName == fileName (but without the extension)
unittest
Specify moduleName.className
, like so:
python -m unittest -q test_fixtures.TestSkip
pytest
Specify fileName.py::className
, like so:
pytest -q -s test_fixtures.py::TestSkip