From 02d94e69f021f938ba21ee36f5c93176f473396e Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Wed, 2 Apr 2014 09:14:16 -0700 Subject: [PATCH 1/2] testing/test_capture.py: Remove unused `import tempfile` --HG-- branch : remove_unused_import --- testing/test_capture.py | 1 - 1 file changed, 1 deletion(-) diff --git a/testing/test_capture.py b/testing/test_capture.py index 2fceea50e..1cc16ca6f 100644 --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -4,7 +4,6 @@ from __future__ import with_statement import os import sys import py -import tempfile import pytest import contextlib From 2c0f6207e93a9cdd41b2ebc7bfbec8d259ce1009 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Wed, 2 Apr 2014 09:48:08 -0700 Subject: [PATCH 2/2] test_capture.py: More PEP8. Remove unused `cap` in `with`. --HG-- branch : remove_unused_import --- testing/test_capture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/test_capture.py b/testing/test_capture.py index 1cc16ca6f..3c4398f61 100644 --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -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()")