summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-11-12 19:36:29 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-11-12 19:36:29 (GMT)
commit7abe61f6b5d995acad215fde0a5438605d572769 (patch)
treed0534462cd3bd2cbbf8ba40e87cd40af463a0f7f /Lib
parent2515c4d34e2206a7eccd5706eb8cd345323f798f (diff)
downloadcpython-7abe61f6b5d995acad215fde0a5438605d572769.zip
cpython-7abe61f6b5d995acad215fde0a5438605d572769.tar.gz
cpython-7abe61f6b5d995acad215fde0a5438605d572769.tar.bz2
Restore smtpd.DEBUGSTREAM at the end of test_smtpd.
(backport of 6b9f547e92d8)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_smtpd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py
index a4cd670..68ccc29 100644
--- a/Lib/test/test_smtpd.py
+++ b/Lib/test/test_smtpd.py
@@ -52,6 +52,7 @@ class SMTPDServerTest(TestCase):
class SMTPDChannelTest(TestCase):
def setUp(self):
smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
self.debug = smtpd.DEBUGSTREAM = io.StringIO()
self.server = DummyServer('a', 'b')
conn, addr = self.server.accept()
@@ -60,6 +61,7 @@ class SMTPDChannelTest(TestCase):
def tearDown(self):
asyncore.close_all()
asyncore.socket = smtpd.socket = socket
+ smtpd.DEBUGSTREAM = self.old_debugstream
def write_line(self, line):
self.channel.socket.queue_recv(line)