1 https://github.com/shopkeep/pytest-black/issues/66
3 --- pytest-black-0.3.12/tests/test_black.py.orig
4 +++ pytest-black-0.3.12/tests/test_black.py
9 - result = testdir.runpytest("--black")
10 + result = testdir.runpytest("--black", "-p", "no:cov", "-p", "no:mypy")
11 result.assert_outcomes(failed=1)
15 # replace trailing newline (stripped by testdir.makepyfile)
16 p = p.write(p.read() + "\n")
18 - result = testdir.runpytest("--black")
19 + result = testdir.runpytest("--black", "-p", "no:cov", "-p", "no:mypy")
20 result.assert_outcomes(passed=1)
26 # Test once to populate the cache
27 - result = testdir.runpytest("--black")
28 + result = testdir.runpytest("--black", "-p", "no:cov", "-p", "no:mypy")
29 result.assert_outcomes(passed=1)
31 # Run it again, it should be skipped
32 - result = testdir.runpytest("--black", "-rs")
33 + result = testdir.runpytest("--black", "-rs", "-p", "no:cov", "-p", "no:mypy")
34 result.assert_outcomes(skipped=1)
35 result.stdout.fnmatch_lines(["SKIP*previously passed black format checks"])
37 # Update the file and test again.
39 - result = testdir.runpytest("--black")
40 + result = testdir.runpytest("--black", "-p", "no:cov", "-p", "no:mypy")
41 result.assert_outcomes(passed=1)
45 # Rename pyproject.toml ¯\_(ツ)_/¯
46 testdir.run("mv", "test_exclude.pyproject.toml", "pyproject.toml")
48 - result = testdir.runpytest("--black")
49 + result = testdir.runpytest("--black", "-p", "no:checkdocs", "-p", "no:cov", "-p", "no:mypy")
50 result.assert_outcomes(skipped=1, passed=0)
54 # Rename pyproject.toml ¯\_(ツ)_/¯
55 testdir.run("mv", "test_exclude_folder.pyproject.toml", "pyproject.toml")
57 - result = testdir.runpytest("--black")
58 + result = testdir.runpytest("--black", "-p", "no:checkdocs", "-p", "no:cov", "-p", "no:mypy")
59 result.assert_outcomes(skipped=1, passed=0)
63 # Rename pyproject.toml ¯\_(ツ)_/¯
64 testdir.run("mv", "test_include.pyproject.toml", "pyproject.toml")
66 - result = testdir.runpytest("--black")
67 + result = testdir.runpytest("--black", "-p", "no:checkdocs", "-p", "no:cov", "-p", "no:mypy")
68 result.assert_outcomes(skipped=0, passed=1)
72 # replace trailing newline (stripped by testdir.makepyfile)
73 p = p.write(p.read() + "\n")
75 - result = testdir.runpytest("--black")
76 + result = testdir.runpytest("--black", "-p", "no:cov", "-p", "no:mypy")
77 result.assert_outcomes(passed=1)
79 out = "\n".join(result.stdout.lines)