Fix manage.py cov Follow-up from "Resolve "Check & Update dependencies 2021-10""
The following discussion from !274 (merged) should be addressed:
-
@nils.brinckmann started a discussion: (+1 comment) With the change in the coverage module I run the following into the orchestration repo with this
58-check-update-dependencies-2021-10
branch for the backend:python3 manage.py cov
And I got an exception:
Traceback (most recent call last): File "/usr/src/app/manage.py", line 177, in <module> cli() File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 600, in main return super().main(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 444, in decorator return __ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/src/app/manage.py", line 73, in cov COV.stop() File "/usr/local/lib/python3.9/site-packages/coverage/control.py", line 575, in stop self._collector.stop() File "/usr/local/lib/python3.9/site-packages/coverage/collector.py", line 336, in stop assert self._collectors[-1] is self, ( AssertionError: Expected current collector to be <Collector at 0x7f12aaf60fa0: CTracer>, but it's <Collector at 0x7f12a6eb9cd0: CTracer>
The tests themselves run just fine (252 tests that passed), but creating the coverage report seems to fail.
I'm not sure if this is due to the updates, so I will retry it with the current master, but I guess this is something we should fix (as long as it is not just me).