-
Notifications
You must be signed in to change notification settings - Fork 0
Python Notes
shamik edited this page Apr 25, 2024
·
1 revision
cd to the directory and then enter
coverage run -m pytest
coverage run --omit="<dir>" -m pytest
Below is an example of the same omitting test dir
coverage run --omit="tests/*" -m pytest
Generate html report for code coverage in a specified directory. For eg. If the directory is coverage the code below will work
coverage html -d ../../coverage/
coverage html --title "Whatever floats your boat"
coverage report --omit="tests/*"
pytest tests/xml_parser/xml_parser_test.py
pytest --ignore=tests/summarization/ --ignore=tests/test_utils/ tests/
python common/test/common/anlpModels/ESGNumExtract/number_extraction_test.py NumberExtractionTest.test_save_model
pytest common/test/common/anlpModels/ESGNumExtract/number_extraction_test.py::NumberExtractionTest::test_save_model
pytest -s common/test/common/anlpModels/ESGNumExtract/number_extraction_test.py