diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 21:31:18 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 21:31:18 +0200 |
commit | 60713979045babcbec3cfeed62429a7d57c88d6e (patch) | |
tree | b67b16e7f0def2ff07b7693c5c41a0d00248884c /Lib/test/test_ftplib.py | |
parent | 12da7372a223fc682a2d1bb9eb646da747e61fd8 (diff) | |
download | cpython-60713979045babcbec3cfeed62429a7d57c88d6e.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 4686183618..64cd80bc14 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: |