-
Notifications
You must be signed in to change notification settings - Fork 0
Python Notes
Shamik edited this page Mar 19, 2026
·
2 revisions
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
pre-commit install -c ../../../.pre-commit-config.yamlHere am skipping mypy
SKIP=mypy git commit -m "feat: archived the old scraper."
### Skipping multiple pre-commit hooks
```sh
SKIP=black,trailing-whitespace,end-of-file-fixer,…# Enable file completion for uvx
complete -o default uvxalias mam="uvx --python 3.12 marimo -y edit --sandbox --watch"