Skip to content

Commit

Permalink
test: exclude statement from coverage report
Browse files Browse the repository at this point in the history
In the move to Python 3.9, we are subject to a coverage behavior that
has yet to be corrected.
In the interest of keeping the coverage report to 100%, we exclude
the statement that coverage.py reports as not being executed, despite
it being executed via tests.

Refs: nedbat/coveragepy#1041

Signed-off-by: Mike Fiedler <[email protected]>
  • Loading branch information
miketheman committed Feb 23, 2022
1 parent 130beaf commit d6938e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion warehouse/search/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def reindex(self, request):
raise
finally:
request.db.rollback()
request.db.close()
request.db.close() # pragma: no cover

# Now that we've finished indexing all of our data we can update the
# replicas and refresh intervals.
Expand Down

0 comments on commit d6938e0

Please sign in to comment.