test_capture.py: More PEP8. Remove unused `cap` in `with`.

--HG--
branch : remove_unused_import
This commit is contained in:
Marc Abramowitz 2014-04-02 09:48:08 -07:00
parent 02d94e69f0
commit 2c0f6207e9
1 changed files with 2 additions and 2 deletions

View File

@ -857,7 +857,7 @@ class TestStdCapture:
def test_stdin_restored(self):
old = sys.stdin
with self.getcapture(in_=True) as cap:
with self.getcapture(in_=True):
newstdin = sys.stdin
assert newstdin != sys.stdin
assert sys.stdin is old
@ -866,7 +866,7 @@ class TestStdCapture:
print ("XXX this test may well hang instead of crashing")
print ("XXX which indicates an error in the underlying capturing")
print ("XXX mechanisms")
with self.getcapture() as cap:
with self.getcapture():
pytest.raises(IOError, "sys.stdin.read()")