summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_ftplib.py')
-rw-r--r--Lib/test/test_ftplib.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index 3492ba4..56e3d8a 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -10,6 +10,7 @@ import errno
import os
import threading
import time
+import unittest
try:
import ssl
except ImportError:
@@ -1144,18 +1145,10 @@ class MiscTestCase(TestCase):
support.check__all__(self, ftplib, not_exported=not_exported)
-def test_main():
- tests = [TestFTPClass, TestTimeouts,
- TestIPv6Environment,
- TestTLS_FTPClassMixin, TestTLS_FTPClass,
- MiscTestCase]
-
+def setUpModule():
thread_info = threading_helper.threading_setup()
- try:
- support.run_unittest(*tests)
- finally:
- threading_helper.threading_cleanup(*thread_info)
+ unittest.addModuleCleanup(threading_helper.threading_cleanup, *thread_info)
if __name__ == '__main__':
- test_main()
+ unittest.main()