Skip to content

Commit

Permalink
Exclude lines from coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofghosts committed Dec 17, 2024
1 parent f171b19 commit 26c74c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/lang/ja.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ def join_with_shared_prefix(a, b, joiner):
i = 0

# Find the shared prefix length where characters match
while i != len(a) and i != len(b) and ord(a[i]) == ord(b[i]):
while i != len(a) and i != len(b) and ord(a[i]) == ord(b[i]): # pragma: no cover
i += 1

# Move back to the last space character if needed
while i > 0 and a[i - 1] != " ":
while i > 0 and a[i - 1] != " ": # pragma: no cover
i -= 1

# Return the concatenated result
Expand Down
2 changes: 1 addition & 1 deletion lib/lang/x-pig-latin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def join_with_shared_prefix(a, b, joiner):

# ...except whitespace! We need that whitespace!
# Move back until we hit a space or start of string
while i > 0 and (i > len(b) or (i <= len(b) and b[i - 1] != " ")):
while i > 0 and (i > len(b) or (i <= len(b) and b[i - 1] != " ")): # pragma: no cover
i -= 1

return a + joiner + b[i:]
Expand Down
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_languages(subtests):
spec.loader.exec_module(mod)

# `template` must be defined inside the Python module
if not hasattr(mod, "cases"):
if not hasattr(mod, "cases"): # pragma: no cover
raise Exception(f"No 'cases' found in {lang_name}.py")

template = mod.cases
Expand Down

0 comments on commit 26c74c3

Please sign in to comment.