Skip to content

Commit

Permalink
Fix coverage:
Browse files Browse the repository at this point in the history
- autocomplete_definition can be excluded as it is tested in a different way
- exclude branch of test_autocomplete which is only hit if there is an issue with the definition file
  • Loading branch information
rw251 committed Jan 15, 2025
1 parent 656883f commit 58f1483
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ exclude_also = [
omit = [
"ehrql/docs/__main__.py",
"tests/acceptance/external_studies/*",
"tests/autocomplete/autocomplete_definition.py",
"tests/lib/update_tpp_schema.py",
]

Expand Down
2 changes: 1 addition & 1 deletion tests/autocomplete/test_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def get_lines_and_expected_types_from_autocomplete_def_file():
multiline_optional_method = start_of_multiline_statement.group(
"optional_method"
)
else:
else: # pragma: no cover
assert 0, (
f"The autocomplete_definition.py file contains an unexpected line: [{line}]\n\n"
"All lines must either be:\n"
Expand Down

0 comments on commit 58f1483

Please sign in to comment.