Cython coverage not showing properly

21 Views Asked by At

After any call to a Cython library, no lines show up as covered, even though I have tests that are clearly covering the library calls. I even tested this by putting in a obligatory NotImplementedError() to make sure they failed.

def build_ai_cython_widget():
  my_cython_lib.do_something()
  call_another_function()  # This is not covered

Cython doesn't include coverage information unless it's recompiled with slow coverage, but I can't do this since I don't own the library. I tried using the various ENV variables suggested by the the docs, but that did not help.

The only thing that seems to trigger it is an await, but I can't do that because my code does not support await.

Unfortunately I can't mock the underlying library since my tests would be meaningless in that case.

How do I fix this?

0

There are 0 best solutions below