]> granicus.if.org Git - python/commitdiff
#16935: update test_crypt now that unittest discover understands SkipTest.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 1 Mar 2013 12:53:45 +0000 (14:53 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 1 Mar 2013 12:53:45 +0000 (14:53 +0200)
Lib/test/test_crypt.py

index cfb7341e20a9b15644b617b23f80f893e1f707a0..624d702f99e5f0140024de7c2a7acc914117d65e 100644 (file)
@@ -1,11 +1,7 @@
 from test import support
 import unittest
 
-def setUpModule():
-    # this import will raise unittest.SkipTest if _crypt doesn't exist,
-    # so it has to be done in setUpModule for test discovery to work
-    global crypt
-    crypt = support.import_module('crypt')
+crypt = support.import_module('crypt')
 
 class CryptTestCase(unittest.TestCase):