| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add explicit coverage showing default ellipsis exclusion patterns inside single-line strings are ignored while real pragma comments on the same line still exclude.
| ltext, | ||
| ) | ||
| ) | ||
| if toktype == token.STRING and slineno != elineno: |
There was a problem hiding this comment.
This doesn't seem right to me: This is saying that any lines that are part of a multi-line string won't be excluded. That's not taking into account what else is on those lines, or whether the multi-line string matched one of the exclusion rules.
For example, this test fails:
self.check_coverage(
"""\
a = 1
ignore_var = "2"
ignore_var = '''
3,4,5
'''
ignore_var = "6"
a = 7
""",
excludes=["ignore_var"],
lines=[1, 7],
)
Sorry, something went wrong.
There was a problem hiding this comment.
I've added this as a test.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary:
Tests:
Supersedes #2177
Fixes #2112