Merged in msabramo/pytest/remove_unused_import (pull request #146)
testing/test_capture.py: Remove unused stuff for PEP8 compliance
This commit is contained in:
commit
7d10a57514
|
@ -4,7 +4,6 @@ from __future__ import with_statement
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import py
|
import py
|
||||||
import tempfile
|
|
||||||
import pytest
|
import pytest
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
|
@ -858,7 +857,7 @@ class TestStdCapture:
|
||||||
|
|
||||||
def test_stdin_restored(self):
|
def test_stdin_restored(self):
|
||||||
old = sys.stdin
|
old = sys.stdin
|
||||||
with self.getcapture(in_=True) as cap:
|
with self.getcapture(in_=True):
|
||||||
newstdin = sys.stdin
|
newstdin = sys.stdin
|
||||||
assert newstdin != sys.stdin
|
assert newstdin != sys.stdin
|
||||||
assert sys.stdin is old
|
assert sys.stdin is old
|
||||||
|
@ -867,7 +866,7 @@ class TestStdCapture:
|
||||||
print ("XXX this test may well hang instead of crashing")
|
print ("XXX this test may well hang instead of crashing")
|
||||||
print ("XXX which indicates an error in the underlying capturing")
|
print ("XXX which indicates an error in the underlying capturing")
|
||||||
print ("XXX mechanisms")
|
print ("XXX mechanisms")
|
||||||
with self.getcapture() as cap:
|
with self.getcapture():
|
||||||
pytest.raises(IOError, "sys.stdin.read()")
|
pytest.raises(IOError, "sys.stdin.read()")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue