Skip to content

Commit

Permalink
Merge pull request #3059 from asottile/yesqa
Browse files Browse the repository at this point in the history
Remove unnecessary `# noqa` comments.
  • Loading branch information
nicoddemus authored Dec 22, 2017
2 parents 672c901 + 205e29d commit 0899727
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion testing/code/test_excinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class FakeRawTB(object):
tb = FakeRawTB()
excinfo.traceback = Traceback(tb)

fail = IOError() # noqa
fail = IOError()
repr = pr.repr_excinfo(excinfo)
assert repr.reprtraceback.reprentries[0].lines[0] == "> ???"
if py.std.sys.version_info[0] >= 3:
Expand Down
4 changes: 2 additions & 2 deletions testing/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_setup_fails_and_failure_is_cached(self, testdir):
def setup_module(mod):
raise ValueError(42)
def test_func(): pass
""") # noqa
""")
ss = runner.SetupState()
pytest.raises(ValueError, lambda: ss.prepare(item))
pytest.raises(ValueError, lambda: ss.prepare(item))
Expand Down Expand Up @@ -564,7 +564,7 @@ def f():
importorskip("asdlkj")

try:
sys = importorskip("sys") # noqa
sys = importorskip("sys")
assert sys == py.std.sys
# path = pytest.importorskip("os.path")
# assert path == py.std.os.path
Expand Down
2 changes: 1 addition & 1 deletion testing/test_skipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def test_skipif_conditional(self, testdir):
@pytest.mark.skipif("hasattr(os, 'sep')")
def test_func():
pass
""") # noqa
""")
x = pytest.raises(pytest.skip.Exception, lambda:
pytest_runtest_setup(item))
assert x.value.msg == "condition: hasattr(os, 'sep')"
Expand Down

0 comments on commit 0899727

Please sign in to comment.