/opt/cloudlinux/venv/lib/python3.11/site-packages/pyflakes/test
NameSizeModeActions
__pycache__/-0755rm
harness.py10040644editdlrm
test_api.py269040644editdlrm
test_builtin.py5820644editdlrm
test_checker.py59200644editdlrm
test_code_segment.py44960644editdlrm
test_dict.py52710644editdlrm
test_doctests.py128560644editdlrm
test_imports.py337030644editdlrm
test_is_literal.py45730644editdlrm
test_match.py20970644editdlrm
test_other.py516900644editdlrm
test_type_annotations.py203010644editdlrm
test_undefined_names.py235650644editdlrm
__init__.py00644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/pyflakes/test/harness.py (1004B)
import ast import textwrap import unittest from pyflakes import checker __all__ = ['TestCase', 'skip', 'skipIf'] skip = unittest.skip skipIf = unittest.skipIf class TestCase(unittest.TestCase): withDoctest = False def flakes(self, input, *expectedOutputs, **kw): tree = ast.parse(textwrap.dedent(input)) file_tokens = checker.make_tokens(textwrap.dedent(input)) if kw.get('is_segment'): tree = tree.body[0] kw.pop('is_segment') w = checker.Checker( tree, file_tokens=file_tokens, withDoctest=self.withDoctest, **kw ) outputs = [type(o) for o in w.messages] expectedOutputs = list(expectedOutputs) outputs.sort(key=lambda t: t.__name__) expectedOutputs.sort(key=lambda t: t.__name__) self.assertEqual(outputs, expectedOutputs, '''\ for input: {} expected outputs: {!r} but got: {}'''.format(input, expectedOutputs, '\n'.join([str(o) for o in w.messages]))) return w