diff --git a/tests/test_flake8.py b/tests/test_flake8.py index 56720af..144d8c7 100644 --- a/tests/test_flake8.py +++ b/tests/test_flake8.py @@ -1,6 +1,5 @@ """Unit tests for flake8 pytest plugin.""" - import pathlib import py @@ -54,13 +53,11 @@ def test_default_flake8_ignores(self, testdir): testdir.tmpdir.ensure("tests/hello.py") result = testdir.runpytest("--flake8", "-s") result.assert_outcomes(passed=2) - result.stdout.fnmatch_lines( - [ - "*collected 2*", - "*xy.py .*", - "*2 passed*", - ] - ) + result.stdout.fnmatch_lines([ + "*collected 2*", + "*xy.py .*", + "*2 passed*", + ]) def test_ignores_all(self, testdir): """Verify success when all errors are ignored.""" @@ -75,25 +72,21 @@ def test_ignores_all(self, testdir): testdir.tmpdir.ensure("tests/hello.py") result = testdir.runpytest("--flake8", "-s") result.assert_outcomes(passed=1) - result.stdout.fnmatch_lines( - [ - "*collected 1*", - "*xy.py .*", - "*1 passed*", - ] - ) + result.stdout.fnmatch_lines([ + "*collected 1*", + "*xy.py .*", + "*1 passed*", + ]) def test_w293w292(self, testdir, example): result = testdir.runpytest( "--flake8", ) - result.stdout.fnmatch_lines( - [ - # "*plugins*flake8*", - "*W293*", - "*W292*", - ] - ) + result.stdout.fnmatch_lines([ + # "*plugins*flake8*", + "*W293*", + "*W292*", + ]) result.assert_outcomes(failed=1) def test_mtime_caching(self, testdir, example): @@ -101,23 +94,19 @@ def test_mtime_caching(self, testdir, example): result = testdir.runpytest( "--flake8", ) - result.stdout.fnmatch_lines( - [ - # "*plugins*flake8*", - "*W293*", - "*W292*", - ] - ) + result.stdout.fnmatch_lines([ + # "*plugins*flake8*", + "*W293*", + "*W292*", + ]) result.assert_outcomes(passed=1, failed=1) result = testdir.runpytest( "--flake8", ) - result.stdout.fnmatch_lines( - [ - "*W293*", - "*W292*", - ] - ) + result.stdout.fnmatch_lines([ + "*W293*", + "*W292*", + ]) result.assert_outcomes(skipped=1, failed=1) testdir.makeini(""" [pytest] @@ -144,11 +133,9 @@ def f(): """, ) result = testdir.runpytest("--flake8") - result.stdout.fnmatch_lines( - [ - "*collected 1*", - ] - ) + result.stdout.fnmatch_lines([ + "*collected 1*", + ]) result.assert_outcomes(failed=1) @@ -159,11 +146,9 @@ class AClass: """) p = p.write(p.read() + "\n") result = testdir.runpytest("--flake8", "--verbose") - result.stdout.fnmatch_lines( - [ - "*test_ok_verbose*", - ] - ) + result.stdout.fnmatch_lines([ + "*test_ok_verbose*", + ]) result.assert_outcomes(passed=1) @@ -174,12 +159,10 @@ def test_hello(): # """) result = testdir.runpytest("--flake8", "-mflake8") - result.stdout.fnmatch_lines( - [ - "*E201*", - "*1 failed*", - ] - ) + result.stdout.fnmatch_lines([ + "*E201*", + "*1 failed*", + ]) result.assert_outcomes(failed=1)