MCPcopy
hub / github.com/PyCQA/flake8 / test_statistics_for_single_record

Function test_statistics_for_single_record

tests/unit/test_statistics.py:91–98  ·  view source on GitHub ↗

Show we can retrieve the only statistic recorded.

()

Source from the content-addressed store, hash-verified

89
90
91def test_statistics_for_single_record():
92 """Show we can retrieve the only statistic recorded."""
93 aggregator = stats.Statistics()
94 assert list(aggregator.statistics_for("E")) == []
95 aggregator.record(make_error())
96 statistics = list(aggregator.statistics_for("E"))
97 assert len(statistics) == 1
98 assert isinstance(statistics[0], stats.Statistic)
99
100
101def test_statistics_for_filters_by_filename():

Callers

nothing calls this directly

Calls 3

statistics_forMethod · 0.95
recordMethod · 0.95
make_errorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…