diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 21:31:38 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 21:31:38 +0200 |
commit | 43767638a9590689fd8bcd1fcedd15bbe4660856 (patch) | |
tree | 8e96e92a7d1e7af2a20aaa15c9383e0d570acacc /Lib/test/test_ftplib.py | |
parent | 7a07cc90c73b5a5587536c2f3fc5c2909b59be39 (diff) | |
download | cpython-git-43767638a9590689fd8bcd1fcedd15bbe4660856.tar.gz |
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 c0b537a74a..41463e2a5b 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') @@ -780,6 +780,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): @@ -820,6 +821,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. @@ -835,6 +837,7 @@ class TestTLS_FTPClassMixin(TestFTPClass): self.client.prot_p() +@skipUnless(ssl, "SSL not available") class TestTLS_FTPClass(TestCase): """Specific TLS_FTP class tests.""" @@ -1027,12 +1030,9 @@ class TestNetrcDeprecation(TestCase): def test_main(): - tests = [TestFTPClass, TestTimeouts, TestNetrcDeprecation] - if support.IPV6_ENABLED: - tests.append(TestIPv6Environment) - - if ssl is not None: - tests.extend([TestTLS_FTPClassMixin, TestTLS_FTPClass]) + tests = [TestFTPClass, TestTimeouts, TestNetrcDeprecation, + TestIPv6Environment, + TestTLS_FTPClassMixin, TestTLS_FTPClass] thread_info = support.threading_setup() try: |