diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 19:31:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 19:31:18 (GMT) |
commit | 79080686274f87d7110c5150ee6c31de5dc3c5db (patch) | |
tree | 0b5701193b462ad2e923148c2d5ee23ee895b270 /Lib/test/test_ftplib.py | |
parent | 834856aca9ebd28d314a8d963b193f9d8176a956 (diff) | |
download | cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.zip cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.tar.gz cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.tar.bz2 |
Issue #18702: All skipped tests now reported as skipped.
Diffstat (limited to 'Lib/test/test_ftplib.py')
-rw-r--r-- | Lib/test/test_ftplib.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index 4686183..64cd80bc 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -16,7 +16,7 @@ try: except ImportError: ssl = None -from unittest import TestCase +from unittest import TestCase, skipUnless from test import support from test.support import HOST, HOSTv6 threading = support.import_module('threading') @@ -779,6 +779,7 @@ class TestFTPClass(TestCase): self.assertRaises(ftplib.Error, self.client.storlines, 'stor', f) +@skipUnless(support.IPV6_ENABLED, "IPv6 not enabled") class TestIPv6Environment(TestCase): def setUp(self): @@ -819,6 +820,7 @@ class TestIPv6Environment(TestCase): retr() +@skipUnless(ssl, "SSL not available") class TestTLS_FTPClassMixin(TestFTPClass): """Repeat TestFTPClass tests starting the TLS layer for both control and data connections first. @@ -834,6 +836,7 @@ class TestTLS_FTPClassMixin(TestFTPClass): self.client.prot_p() +@skipUnless(ssl, "SSL not available") class TestTLS_FTPClass(TestCase): """Specific TLS_FTP class tests.""" @@ -1015,12 +1018,9 @@ class TestTimeouts(TestCase): def test_main(): - tests = [TestFTPClass, TestTimeouts] - if support.IPV6_ENABLED: - tests.append(TestIPv6Environment) - - if ssl is not None: - tests.extend([TestTLS_FTPClassMixin, TestTLS_FTPClass]) + tests = [TestFTPClass, TestTimeouts, + TestIPv6Environment, + TestTLS_FTPClassMixin, TestTLS_FTPClass] thread_info = support.threading_setup() try: |