]> granicus.if.org Git - python/commitdiff
Make test_nntplib more robust
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 21 Nov 2010 17:14:19 +0000 (17:14 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 21 Nov 2010 17:14:19 +0000 (17:14 +0000)
Lib/test/test_nntplib.py

index 13bb5059d59fb04ae003127034798e12cfbdb8cf..a387f61f1e57c14a4fdf772397f2b2cf14b7b23f 100644 (file)
@@ -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):