diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-06-04 19:55:51 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-06-04 19:55:51 (GMT) |
commit | 05cab75d5908948a4607494a8bfc5b85a735c713 (patch) | |
tree | c7abe9dd3f6cbfcc02d26bacd7ba58b144685a24 /Lib/test | |
parent | bd7b5dd816150cf0bc0354828f1e7e4c6fff399f (diff) | |
download | cpython-05cab75d5908948a4607494a8bfc5b85a735c713.zip cpython-05cab75d5908948a4607494a8bfc5b85a735c713.tar.gz cpython-05cab75d5908948a4607494a8bfc5b85a735c713.tar.bz2 |
#8739: fix omission of DEBUGSTREAM reset in new test in test_smtpd.
This clears up an error in detected by refleak mode that showed up when
test_smtplib was run after test_smtpd in the same refleak run.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_smtpd.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py index dda1941..93f14c4 100644 --- a/Lib/test/test_smtpd.py +++ b/Lib/test/test_smtpd.py @@ -507,6 +507,7 @@ class SMTPDChannelWithDataSizeLimitTest(unittest.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() @@ -516,6 +517,7 @@ class SMTPDChannelWithDataSizeLimitTest(unittest.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) |