I'm using nosetests --cover-erase --with-cover --cover-branches to run my test cases.
I'm using PonyORM to delete set of objects. Below is how my code looks like.
@db_session
def remove_all_stuff(self):
delete(j for j in MyEntityClass if j.deleted == True)
When I calculate the coverage, even though I execute remove_all_jobs. PonyORM doesn't execute the generator expression inside delete(.
How do I ignore the generator expression and still check that the delete( is called?
What I found.
# pragma: no cover-> cannot be used because I need to coverdelete[report] exclude_linesin.coveragercalso doesn't work for this scenario.