facebookincubator / ptr

Python Test Runner.
MIT License
284 stars 15 forks source link

If no `required_coverage` set in setup.* files `--print-cov` does not print coverage #106

Closed cooperlees closed 3 years ago

cooperlees commented 3 years ago

How is ptr not doing what you expect?

Expected --print-cov to show me the coverage even if the setup.* files do no have ``.

What is your suggestion to make this better?

Fix the code to print coverage if the argument is true

Code/Bug example?

If we have no required_coverage --print-cov is not taken into account.

ptr_params = {
    "entry_point_module": "ansible_shed/main",
    "test_suite": "ansible_shed.tests.base",
    "test_suite_timeout": 300,
#    "required_coverage": {
#        "aioexabgp/announcer/__init__.py": 50,
#    },
    "run_flake8": True,
    "run_black": True,
    "run_mypy": True,
}

How can a developer reproduce this?

Comment out required_coverage and try getting coverage to print.