real coverage?
I am trying to understand, what is the real coverage of our test, and found out, that if we run test like
pytest --cov --cov-report=html --cov-append
and
coverage run -a -m pytest
coverage html
we get different coverage:
| file | pytest --cov | coverage run |
|---|---|---|
| PyTango/init.py | 89% | 0% |
| tango/init.py | 0% | 100% |
| tango/api_util.py | 0% | 94% |
| tango/asyncio.py | 100% | 100% |
| tango/asyncio_executor.py | 76% | 21% |
| tango/attr_data.py | 93% | 35% |
| tango/attribute_proxy.py | 7% | 35% |
| tango/auto_monitor.py | 0% | 80% |
| tango/base_types.py | 1% | 56% |
| tango/callback.py | 0% | 93% |
| tango/client.py | 22% | 0% |
| tango/codec.py | 11% | 11% |
| tango/connection.py | 33% | 35% |
| tango/databaseds/init.py | 100% | 100% |
| tango/databaseds/database.py | 28% | 0% |
| tango/databaseds/db_access/init.py | 100% | 100% |
| tango/databaseds/db_access/sqlite3.py | 0% | 0% |
| tango/databaseds/db_errors.py | 100% | 0% |
| tango/db.py | 20% | 46% |
| tango/device_attribute.py | 0% | 52% |
| tango/device_class.py | 44% | 20% |
| tango/device_data.py | 0% | 91% |
| tango/device_proxy.py | 37% | 22% |
| tango/device_server.py | 39% | 38% |
| tango/encoded_attribute.py | 33% | 12% |
| tango/exception.py | 0% | 74% |
| tango/futures.py | 100% | 100% |
| tango/futures_executor.py | 93% | 0% |
| tango/gevent.py | 84% | 84% |
| tango/gevent_executor.py | 93% | 28% |
| tango/globals.py | 48% | 18% |
| tango/green.py | 56% | 34% |
| tango/group.py | 22% | 49% |
| tango/group_reply.py | 18% | 59% |
| tango/group_reply_list.py | 30% | 50% |
| tango/log4tango.py | 6% | 22% |
| tango/pipe.py | 0% | 22% |
| tango/pipe_data.py | 0% | 8% |
| tango/pytango_init.py | 0% | 98% |
| tango/pytango_pprint.py | 30% | 59% |
| tango/pyutil.py | 34% | 33% |
| tango/release.py | 0% | 100% |
| tango/server.py | 71% | 42% |
| tango/tango_numpy.py | 46% | 0% |
| tango/tango_object.py | 13% | 13% |
| tango/test_context.py | 82% | 14% |
| tango/test_utils.py | 94% | 39% |
| tango/time_val.py | 4% | 49% |
| tango/utils.py | 31% | 24% |
| tests/conftest.py | 64% | 33% |
| tests/test_api_util.py | 100% | 43% |
| tests/test_async.py | 90% | 25% |
| tests/test_attribute_proxy.py | 94% | 31% |
| tests/test_client.py | 89% | 16% |
| tests/test_database.py | 93% | 47% |
| tests/test_databaseds.py | 89% | 26% |
| tests/test_event.py | 79% | 17% |
| tests/test_server.py | 94% | 5% |
| tests/test_telemetry.py | 23% | 23% |
| tests/test_test_context.py | 95% | 26% |
| tests/test_utils.py | 98% | 30% |
| tests/test_zzz_deprecated_pytango_module.py | 100% | 33% |
| tests/valgrind/memory_test.py | 31% | 31% |
One of the main difference: pytest --cov does not cover init.py and all sub-calls, while coverage run - does not cover tests....
How we get real coverage?