Skip to content

Commit

Permalink
Add no-cover pragmas to objects.inv special cases
Browse files Browse the repository at this point in the history
The test-code execution check only runs with a recent version of
Sphinx, and also doesn't run with --testall. So, those cases
*aren't* going to run in the AP check for whether all the test code
is run.
  • Loading branch information
bskinn committed Feb 8, 2021
1 parent a8ead1d commit 5c67685
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_api_good.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,11 @@ def test_api_inventory_matches_sphinx_ifile(

assert not list(dictdiffer.diff(soi_ifile_data, original_ifile_data)), fname

if "celery" in fname:
if "celery" in fname: # pragma: no cover
# Celery inventory contains some exact domain:role:name duplicates
assert inv.count == 54 + sphinx_ifile_data_count(original_ifile_data), fname

elif "opencv" in fname:
elif "opencv" in fname: # pragma: no cover
# OpenCV inventory contains some lines that
# parse incorrectly after sphinx/#8225, which was first
# incorporated into Sphinx 3.3.0
Expand All @@ -545,7 +545,7 @@ def test_api_inventory_matches_sphinx_ifile(
original_ifile_data
), fname

elif "jsonschema" in fname:
elif "jsonschema" in fname: # pragma: no cover
# The version of the jsonschema inventory held in tests/resource
# has an item with an empty uri. Sphinx<2.4 does not import this line
# correctly.
Expand Down

0 comments on commit 5c67685

Please sign in to comment.