From: Antoine Pitrou <solipsis@pitrou.net> Date: Sun, 21 Nov 2010 17:14:19 +0000 (+0000) Subject: Make test_nntplib more robust X-Git-Tag: v3.2b1~259 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3bce11cbbdfa1ea498b8fcaddce5c1adb3a2e32f;p=python Make test_nntplib more robust --- diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 13bb5059d5..a387f61f1e 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -227,8 +227,10 @@ class NetworkedNNTPTestsMixin: def test_zzquit(self): # This test must be called last, hence the name cls = type(self) - self.server.quit() - cls.server = None + try: + self.server.quit() + finally: + cls.server = None @classmethod def wrap_methods(cls):