MCPcopy Create free account
hub / github.com/PyCQA/flake8 / test_debug_information

Function test_debug_information

tests/unit/test_debug.py:10–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def test_debug_information():
11 def _plugin(pkg, version, ep_name):
12 return finder.LoadedPlugin(
13 finder.Plugin(
14 pkg,
15 version,
16 importlib.metadata.EntryPoint(
17 ep_name, "dne:dne", "flake8.extension",
18 ),
19 ),
20 None,
21 {},
22 )
23
24 plugins = finder.Plugins(
25 checkers=finder.Checkers(
26 tree=[
27 _plugin("pkg1", "1.2.3", "X1"),
28 _plugin("pkg1", "1.2.3", "X2"),
29 _plugin("pkg2", "4.5.6", "X3"),
30 ],
31 logical_line=[],
32 physical_line=[],
33 ),
34 reporters={},
35 disabled=[],
36 )
37
38 info = debug.information("9001", plugins)
39 assert info == {
40 "version": "9001",
41 "plugins": [
42 {"plugin": "pkg1", "version": "1.2.3"},
43 {"plugin": "pkg2", "version": "4.5.6"},
44 ],
45 "platform": {
46 "python_implementation": mock.ANY,
47 "python_version": mock.ANY,
48 "system": mock.ANY,
49 },
50 }

Callers

nothing calls this directly

Calls 1

_pluginFunction · 0.70

Tested by

no test coverage detected