summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imaplib.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-02 12:25:56 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-02 12:25:56 (GMT)
commit02bf701b25b6519422c12dd546be348abe07f032 (patch)
tree210266a5142ab82f9a0ff50f80b0192fb3c68edc /Lib/test/test_imaplib.py
parent4f4ba166771843a2fbadd4d62771967cfdbedb72 (diff)
downloadcpython-02bf701b25b6519422c12dd546be348abe07f032.zip
cpython-02bf701b25b6519422c12dd546be348abe07f032.tar.gz
cpython-02bf701b25b6519422c12dd546be348abe07f032.tar.bz2
#17333: test_imaplib now works with unittest test discovery. Patch by Zachary Ware.
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r--Lib/test/test_imaplib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index 4b12d23..7db3f7d 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -444,7 +444,7 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest):
keyfile=CERTFILE, ssl_context=self.create_ssl_context())
-def test_main():
+def load_tests(*args):
tests = [TestImaplib]
if support.is_resource_enabled('network'):
@@ -459,9 +459,9 @@ def test_main():
RemoteIMAPTest, RemoteIMAP_SSLTest, RemoteIMAP_STARTTLSTest,
])
- support.run_unittest(*tests)
+ return unittest.TestSuite([unittest.makeSuite(test) for test in tests])
if __name__ == "__main__":
support.use_resources = ['network']
- test_main()
+ unittest.main()