Skip to content

Commit

Permalink
add test and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Dec 2, 2022
1 parent 8ab6f4b commit ce016f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
File renamed without changes.
19 changes: 16 additions & 3 deletions tests/test_self.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,10 +1247,23 @@ def test_encoding(self, module_name: str, expected_output: str) -> None:
[path], expected_output=expected_output, unexpected_output="(astroid-error)"
)

@pytest.mark.xfail(reason="See https://github.com/PyCQA/pylint/issues/3368")
def test_line_too_long_useless_suppression(self) -> None:
module = join(HERE, "data", "line_too_long_no_code.py")
self._test_output([module, "--enable=all"], expected_output="")
"""A test that demonstrates a known false positive for useless-suppression
See https://github.com/PyCQA/pylint/issues/3368
If you manage to make this test fail and remove the useless-suppression
warning please contact open a Pylint PR!
"""
module = join(HERE, "regrtest_data", "line_too_long_no_code.py")
expected = textwrap.dedent(
f"""
{module}:1:0: I0011: Locally disabling line-too-long (C0301) (locally-disabled)
{module}:1:0: I0021: Useless suppression of 'line-too-long' (useless-suppression)
"""
)

self._test_output([module, "--enable=all"], expected_output=expected)


class TestCallbackOptions:
Expand Down

0 comments on commit ce016f9

Please sign in to comment.