[Avg. reading time: 3 minutes]

Flask Demo Testing

-v : Verbose mode. Shows detailed test results when both Success/Failure.

uv run python -m unittest tests/test_01.py -v

or

poetry run python -m unittest tests/test_01.py -v
uv run python -m unittest tests/test_02.py -v

or

poetry run python -m unittest tests/test_02.py -v
uv run python -m unittest tests/test_03.py -v

or

poetry run python -m unittest tests/test_03.py -v
uv run python  -m unittest tests/test_04.py -v

or

poetry run python  -m unittest tests/test_04.py -v

To run all test files in one go

uv run python  -m unittest discover tests -v

or

poetry run python  -m unittest discover tests -v

To test based on pattern

uv run python  -m unittest tests/t*_04*.py -v

or

poetry run python  -m unittest tests/t*_04*.py -v

To skip a partition function inside a file

@unittest.skip() - to skip a particular test

#unittest #pytest #testVer 5.5.3

Last change: 2025-10-15