Correctly restore sys.stdout in test_descr
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 00f19ce..0b21f57 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -4311,6 +4311,7 @@
def test_file_fault(self):
# Testing sys.stdout is changed in getattr...
import sys
+ test_stdout = sys.stdout
class StdoutGuard:
def __getattr__(self, attr):
sys.stdout = sys.__stdout__
@@ -4320,6 +4321,8 @@
print "Oops!"
except RuntimeError:
pass
+ finally:
+ sys.stdout = test_stdout
def test_vicious_descriptor_nonsense(self):
# Testing vicious_descriptor_nonsense...