Merge pull request #7167 from bluetech/lint-merge-fix
testing: fix lint after merge of old branch
This commit is contained in:
commit
4787fd64a4
|
@ -854,9 +854,12 @@ class TerminalReporter:
|
||||||
if len(locations) < 10:
|
if len(locations) < 10:
|
||||||
return "\n".join(map(str, locations))
|
return "\n".join(map(str, locations))
|
||||||
|
|
||||||
counts_by_filename = collections.Counter(
|
counts_by_filename = (
|
||||||
str(loc).split("::", 1)[0] for loc in locations
|
collections.OrderedDict()
|
||||||
)
|
) # type: collections.OrderedDict[str, int]
|
||||||
|
for loc in locations:
|
||||||
|
key = str(loc).split("::", 1)[0]
|
||||||
|
counts_by_filename[key] = counts_by_filename.get(key, 0) + 1
|
||||||
return "\n".join(
|
return "\n".join(
|
||||||
"{}: {} warning{}".format(k, v, "s" if v > 1 else "")
|
"{}: {} warning{}".format(k, v, "s" if v > 1 else "")
|
||||||
for k, v in counts_by_filename.items()
|
for k, v in counts_by_filename.items()
|
||||||
|
|
|
@ -1465,7 +1465,7 @@ class TestPytestPluginsVariable:
|
||||||
warnings.filterwarnings('always', category=DeprecationWarning)
|
warnings.filterwarnings('always', category=DeprecationWarning)
|
||||||
pytest_plugins=['capture']
|
pytest_plugins=['capture']
|
||||||
""",
|
""",
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
res = testdir.runpytest_subprocess()
|
res = testdir.runpytest_subprocess()
|
||||||
assert res.ret == 0
|
assert res.ret == 0
|
||||||
|
|
Loading…
Reference in New Issue