You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Coverage command_line run fails with AttributeError: 'NoDebugging' object has no attribute 'suppress_callers'
To Reproduce
How can we reproduce the problem? It's hard to reproduce, this is a sporadic issue that we are seeing running some automated tests in endurance.
"""A replacement for DebugControl that will never try to do anything."""
def__init__(self) ->None:
# pylint: disable=super-init-not-called
...
defshould(self, option: str) ->bool:
What commands should we run to reproduce the problem? Hard to give full repro steps since this is seen on some of unit test, but we basically run our software with the following coverage script which wraps the python code we want to test/check the coverage for. It's mostly a wrapper so that we can trigger the dump of the coverage periodically or on demand through a redis message
I'm looking in using an alternative.
From what I know, this implementation was done because the program that got started didn't stop gracefully, so the coverage had to be dumped periodically or on demand right before we kill it to fetch the coverage.
I'm working on cleaning this up at the moment.
But don't you think what I mentioned in the original post is not weird as well ? With the usage of an undefined variable.
Describe the bug
Coverage command_line run fails with AttributeError: 'NoDebugging' object has no attribute 'suppress_callers'
To Reproduce
How can we reproduce the problem? It's hard to reproduce, this is a sporadic issue that we are seeing running some automated tests in endurance.
pip freeze
is helpful.Full stack trace:
Seems like issue is here:
coveragepy/coverage/debug.py
Lines 81 to 89 in 8c2ea9a
Which should be defined here:
coveragepy/coverage/debug.py
Line 54 in 8c2ea9a
But in our case it isn't because it seems the underlying code uses the NoDebugging class which doesn't call the init of its parent:
coveragepy/coverage/debug.py
Lines 111 to 118 in 8c2ea9a
Hard to give full repro steps since this is seen on some of unit test, but we basically run our software with the following coverage script which wraps the python code we want to test/check the coverage for. It's mostly a wrapper so that we can trigger the dump of the coverage periodically or on demand through a redis message
the issue only occurs sporadically, reproduction is not 100%.
Expected behavior
Running a software with the CoverageScript.command_line should have deterministic behavior and not fail sporadically.
The text was updated successfully, but these errors were encountered: