Commit Graph

57 Commits

Author SHA1 Message Date
Serhiy Storchaka 7908068627 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:18 +02:00
Serhiy Storchaka c30b178cbc Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
limiting the call to readline().  Original patch by Michał
Jastrzębski and Giampaolo Rodola.
2013-10-20 16:58:27 +03:00
Benjamin Peterson f8ab76039b remove duplicate test_mkd (closes #19118) 2013-09-29 10:51:00 -04:00
Antoine Pitrou 1e440cf5a2 Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions. 2013-08-22 00:39:46 +02:00
Senthil Kumaran 0d53860e2c Increasing test coverage of ftplib. Patch by Muhammad Jehanzeb 2013-08-12 22:25:27 -07:00
Florent Xicluna 5f3fef37f6 test_ftplib: silence a BytesWarning when checking TypeError 2013-07-06 15:08:21 +02:00
Victor Stinner ed3a303548 Close #6822: ftplib.FTP.storlines() expects a binary file, not a text file
Add an unit test to ensure that text files are rejectect (with TypeError)
2013-04-02 22:13:27 +02:00
Antoine Pitrou 08d02724df Small cleanup in test_ftplib 2012-12-19 20:44:02 +01:00
Benjamin Peterson b29614e047 compare singletons by identity not equality (closes #16712)
Patch from Serhiy Storchaka.
2012-10-09 11:16:03 -04:00
Giampaolo Rodola' 8bc8585873 provide a common method to check for RETR_DATA validity, first checking the expected len and then the actual data content; this way we get a failure on len mismatch rather than content mismatch (which is very long and unreadable) 2012-01-09 17:10:10 +01:00
Charles-François Natali b01c32dab4 Issue #13453: Try to increase some socket timeouts to make some buildbots stop
failing.
2011-12-19 16:12:59 +01:00
Charles-François Natali 4ce2f36461 Issue #13453: Try to increase some socket timeouts to make some buildbots stop
failing.
2011-12-19 16:12:23 +01:00
Giampaolo Rodola' 5de1532163 Issue 12139: ftplib - remove 'post CCC' test to fix various buildot failures due to dummy test server not properly handling SSL shutdown(), see http://bugs.python.org/msg139499 2011-06-30 18:34:41 +02:00
Giampaolo Rodola' 096dcb1eff Issue 12139: add CCC command support to FTP_TLS class to revert the SSL connection back to clear-text. 2011-06-27 11:17:51 +02:00
Giampaolo Rodola' ffc235cbbf merge with 3.2 2011-05-07 19:11:06 +02:00
Giampaolo Rodola' 24befa87dc merge with 3.1 2011-05-07 19:09:34 +02:00
Giampaolo Rodola' 0b5c21f9c9 #12002 - ftplib's abort() method raises TypeError 2011-05-07 19:03:47 +02:00
Giampaolo Rodola' 842e567530 reverting 9688977ef567 committed by accident 2011-05-07 18:47:31 +02:00
Giampaolo Rodola' dbf0454082 test_ftplib.py: change client default timeout from 10 to 2. Hanging for 10 seconds is way too much when we expect a server response which never comes in. 2011-05-07 17:08:34 +02:00
Giampaolo Rodola' b28e09421d test_ftplib.py: change client default timeout from 10 to 2. Hanging for 10 seconds is way too much when we expect a server response which never comes in. 2011-05-07 17:02:21 +02:00
Giampaolo Rodola' a55efb3b6f #11072- applying http://bugs.python.org/review/11072/show suggestions 2011-05-07 16:06:59 +02:00
Giampaolo Rodola' d78def9474 Issue #11072: added MLSD command (RFC-3659) support to ftplib. 2011-05-06 19:49:08 +02:00
Victor Stinner c90e19dd3f Close #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
Patch written by Charles-Francois Natali.
2011-05-01 01:23:03 +02:00
Antoine Pitrou 9c39f3c4ec Issue #11811: Factor out detection of IPv6 support on the current host
and make it available as `test.support.IPV6_ENABLED`.  Patch by
Charles-François Natali.
2011-04-28 19:18:10 +02:00
Antoine Pitrou 6dca52772b Issue #11748: try to fix sporadic failures in test_ftplib 2011-04-03 18:29:45 +02:00
Giampaolo Rodolà 7a2114719d #8594: fix ResourceWarning in test_ftplib.py - patch by Nadeem Vawda. 2011-03-08 21:33:21 +01:00
Giampaolo Rodolà 396ff06051 Fix issue 8594: adds a source_address parameter to ftplib module. 2011-02-28 19:19:51 +00:00
Benjamin Peterson 1bd93a754f fix ftplib resource warnings 2010-10-31 19:58:07 +00:00
Brett Cannon 918e2d4832 Clean up socket closing in test_ftplib. 2010-10-29 23:26:25 +00:00
Antoine Pitrou 51be0f47fa Merged revisions 85492 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85492 | antoine.pitrou | 2010-10-14 22:35:26 +0200 (jeu., 14 oct. 2010) | 3 lines

  Increase timeouts in test_ftplib (for very slow buildbots)
........
2010-10-14 20:44:58 +00:00
Antoine Pitrou d778e568ba Increase timeouts in test_ftplib (for very slow buildbots) 2010-10-14 20:35:26 +00:00
Giampaolo Rodolà 977c707b42 Fix issue 6706: adds new handle_accepted() method to asyncore.dispatcher 2010-10-04 21:08:36 +00:00
Giampaolo Rodolà bbc4782d77 fix issue 9601: ftplib now provides a workaround for invalid response code returned on MKD and PWD by non-compliant FTPserver implementations such as ISS shipped with Windows server 2003 2010-08-23 22:10:32 +00:00
Giampaolo Rodolà f96482e91a as per discussion with antoine revert changes made in 83708 as the user useing ftplib's readline methods is supposed to always use a binary file 2010-08-04 10:36:18 +00:00
Giampaolo Rodolà b939235c6a fix issue #6822: ftplib's storline method doesn't work with text files 2010-08-04 10:12:00 +00:00
Giampaolo Rodolà 6da11e5fce fix wrong assertIs context 2010-05-26 18:21:26 +00:00
Giampaolo Rodolà a67299e757 Fix issue #8806: add SSL contexts support to ftplib 2010-05-26 18:06:04 +00:00
Giampaolo Rodolà bd576b75b7 Fix issue #4972: adds ftplib.FTP context manager protocol 2010-05-10 14:53:29 +00:00
Giampaolo Rodolà d930b63583 Merged revisions 80882 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80882 | giampaolo.rodola | 2010-05-06 22:19:32 +0200 (gio, 06 mag 2010) | 1 line

  adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong
........
2010-05-06 20:21:57 +00:00
Victor Stinner 45df820591 Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines

  Issue #7449, part 1: fix test_support.py for Python compiled without thread
........
  r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line

  Issue #7449, part 2: regrtest.py -j option requires thread support
........
  r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines

  Issue #7449 part 3, test_doctest: import trace module in test_coverage()

  Import trace module fail if the threading module is missing. test_coverage() is
  only used if test_doctest.py is used with the -c option. This commit allows to
  execute the test suite without thread support.

  Move "import trace" in test_coverage() and use
  test_support.import_module('trace').
........
  r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines

  Issue #7449, part 4: skip test_multiprocessing if thread support is disabled

  import threading after _multiprocessing to raise a more revelant error message:
  "No module named _multiprocessing". _multiprocessing is not compiled without
  thread support.
........
  r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py

   * Split Test.test_open() in 2 functions: test_open() and test_thread_open()
   * Skip test_open() and test_thread_open() if we are unable to find the C
     library
   * Skip test_thread_open() if thread support is disabled
   * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
........
  r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 6: fix test_hashlib for missing threading module

  Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
........
  r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 7: simplify threading detection in test_capi

   * Skip TestPendingCalls if threading module is missing
   * Test if threading module is present or not, instead of test the presence of
     _testcapi._test_thread_state
........
  r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing

  TestFifo can be executed without the threading module
........
  r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 9: fix test_xmlrpclib for missing threading module

   * Skip testcases using threads if threading module is missing
   * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
     because URL is not set in this case
........
  r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines

  Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)

  Rewrite r80556: the thread test have to be executed just after the test on
  libc_open() and so the test cannot be splitted in two functions (without
  duplicating code, and I don't want to duplicate code).
........
  r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()

  Use test_support.import_module() instead of import to raise a SkipTest
  exception if the import fail. Import trace fails if the threading module is
  missing.

  See also part 3: test_doctest: import trace module in test_coverage().
........
  r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, last part (11): fix many tests if thread support is disabled

   * Use try/except ImportError or test_support.import_module() to import thread
     and threading modules
   * Add @unittest.skipUnless(threading, ...) to testcases using threads
........
2010-04-28 22:31:17 +00:00
Antoine Pitrou 2c4f98b3c5 Merged revisions 80392 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80392 | antoine.pitrou | 2010-04-23 01:33:02 +0200 (ven., 23 avril 2010) | 9 lines

  Issue #8108: Fix the unwrap() method of SSL objects when the socket has
  a non-infinite timeout.  Also make that method friendlier with applications
  wanting to continue using the socket in clear-text mode, by disabling
  OpenSSL's internal readahead.  Thanks to Darryl Miles for guidance.

  Issue #8108: test_ftplib's non-blocking SSL server now has proper handling
  of SSL shutdowns.
........
2010-04-23 00:16:21 +00:00
Antoine Pitrou 5733c08f55 Merged revisions 79226,79286 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79226 | antoine.pitrou | 2010-03-21 20:33:38 +0100 (dim., 21 mars 2010) | 4 lines

  Issue #3890: Fix recv() and recv_into() on non-blocking SSL sockets.
........
  r79286 | antoine.pitrou | 2010-03-22 15:41:48 +0100 (lun., 22 mars 2010) | 3 lines

  Fix an occasional test_ftplib failure, following r79226.
........
2010-03-22 14:49:10 +00:00
Ezio Melotti e96159335f Merged revisions 77727 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line

  use assert[Not]IsInstance where appropriate
........
2010-01-24 19:26:24 +00:00
Antoine Pitrou 648bcd7068 Merged revisions 76546 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76546 | antoine.pitrou | 2009-11-27 14:18:34 +0100 (ven., 27 nov. 2009) | 7 lines

  Issue #6845: Add restart support for binary upload in ftplib.  The
  `storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
  argument.  Patch by Pablo Mouzo.

  (note: the patch also adds a test for the rest argument in retrbinary())
........
2009-11-27 13:23:26 +00:00
Antoine Pitrou f988cd03fb Merged revisions 76309 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76309 | antoine.pitrou | 2009-11-15 18:22:09 +0100 (dim., 15 nov. 2009) | 4 lines

  Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using
  TLS or SSL.  Patch by Giampaolo Rodola'.
........
2009-11-17 20:21:14 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Benjamin Peterson d06e3b00e9 Merged revisions 66673 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66673 | benjamin.peterson | 2008-09-28 15:57:21 -0500 (Sun, 28 Sep 2008) | 1 line

  merge in the fix for test_ftplib on some bots [reviewed by Georg]
........
2008-09-28 21:00:42 +00:00
Benjamin Peterson 3a53fbbfcf #3911 FTP.makeport was giving bad port numbers
reviewed by Benjamin and Antoine
2008-09-27 22:04:16 +00:00
Benjamin Peterson be17a11721 Merged revisions 66634 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66634 | benjamin.peterson | 2008-09-26 21:49:54 -0500 (Fri, 26 Sep 2008) | 7 lines

  give ftplib a real test suite

  A asyncore based mock ftp server is used to test the protocol.
  This is all thanks to Giampaolo Rodola #3939

  (Barry gave me permission to do this before final on IRC.)
........
2008-09-27 21:49:47 +00:00