summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
Commit message (Collapse)AuthorAgeFilesLines
* Try to fix test_shutil failure under Fedora - patch by Hynek.Antoine Pitrou2012-05-121-1/+1
|
* Issue #14082: shutil.copy2() now copies extended attributes, if possible.Antoine Pitrou2012-05-121-0/+74
| | | | Patch by Hynek Schlawack.
* Issue #14662: Prevent shutil failures on OS X when destination does notNed Deily2012-05-111-0/+29
| | | | support chflag operations. (Patch by Hynek Schlawack)
* Relax tests to fix buildbot failureAntoine Pitrou2012-02-081-2/+2
|
* Issue #13609: Add two functions to query the terminal size:Antoine Pitrou2012-02-081-1/+47
| | | | | os.get_terminal_size (low level) and shutil.get_terminal_size (high level). Patch by Zbigniew Jędrzejewski-Szmek.
* Issue #9993: When the source and destination are on different filesystems,Antoine Pitrou2012-01-061-0/+43
| | | | | | and the source is a symlink, shutil.move() now recreates a symlink on the destination instead of copying the file contents. Patch by Jonathan Niehof and Hynek Schlawack.
* Mock the rename failure a bit betterAntoine Pitrou2012-01-021-1/+2
|
* Issue #12715: Add an optional symlinks argument to shutil functions ↵Antoine Pitrou2011-12-291-0/+219
| | | | | | | | | (copyfile, copymode, copystat, copy, copy2). When that parameter is true, symlinks aren't dereferenced and the operation instead acts on the symlink itself (or creates one, if relevant). Patch by Hynek Schlawack.
* #12191: fix build failures, explicitly passing group argument when I want to ↵Sandro Tosi2011-08-221-2/+2
| | | | test it
* #12191: add shutil.chown() to change user and/or group owner of a given path ↵Sandro Tosi2011-08-221-0/+59
| | | | also specifying their names.
* Clean up test_shutil, to facilitate upcoming improvements (#12721).Éric Araujo2011-08-121-96/+69
| | | | | | | | | | | | | | | | | | | | The tests now have two convenience functions to wrap os.path.join, open and read or write instead of four or six slightly different functions. The new functions accept a tuple of path segments but not a list anymore, as it makes no sense to use a list here; I have also removed the default value for the contents in write_file, as I find it better to have the contents at the call site. For simple open then read/write calls, I have left the usual idiom (with open + read/write), as it is short and readable enough. I’ve also changed some convoluted cleanup code to just use rmtree, and removed dubious LBYL os.path.exists checks. The tests still pass on my machine, and leave no file in $TMP. test_shutil is not as clean as it could be, but I’ll stop here. Initial patch provided by Hynek Schlawack, in preparation for a new feature with new tests in #12715.
* merge from 3.2Senthil Kumaran2011-07-041-1/+1
|\
| * Fix closes issue issue12470 - check for utime for the skipUnless condition.Senthil Kumaran2011-07-041-1/+1
| |
* | Clean up NEWS entry and tests for shutil.disk_usage (#12442)Éric Araujo2011-07-021-5/+5
| |
* | Issue #12442: add shutil.disk_usage()Giampaolo Rodola'2011-07-011-0/+10
| |
* | Issue #12451: Add support.create_empty_file()Victor Stinner2011-06-301-3/+2
| | | | | | | | | | | | | | We don't need to create a temporary buffered binary or text file object just to create an empty file. Replace also os.fdopen(handle).close() by os.close(handle).
* | Refactor a few tests to use the new requires_zlib decorator.Ezio Melotti2011-05-191-12/+7
|/
* merge from 3.1Ronald Oussoren2011-05-061-0/+18
|\
| * Fix for issue 10684: Folders get deleted when trying to change case with ↵Ronald Oussoren2011-05-061-0/+18
| | | | | | | | shutil.move (case insensitive file systems only)
| * Merged revisions 85503 via svnmerge fromAntoine Pitrou2010-10-141-4/+8
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85503 | antoine.pitrou | 2010-10-15 00:11:44 +0200 (ven., 15 oct. 2010) | 2 lines More proper closing of files ........
| * Merged revisions 80833 via svnmerge fromTarek Ziadé2010-05-051-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80833 | tarek.ziade | 2010-05-06 00:27:31 +0200 (Thu, 06 May 2010) | 9 lines Merged revisions 80830 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80830 | tarek.ziade | 2010-05-06 00:15:31 +0200 (Thu, 06 May 2010) | 1 line Fixed #4265: shutil.copyfile() was leaking file descriptors when disk fills ........ ................
| * Merged revisions 76103 via svnmerge fromAntoine Pitrou2009-11-041-53/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76103 | antoine.pitrou | 2009-11-04 01:57:15 +0100 (mer., 04 nov. 2009) | 9 lines Merged revisions 76101 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76101 | antoine.pitrou | 2009-11-04 01:50:26 +0100 (mer., 04 nov. 2009) | 3 lines Make test_shutil clean up after itself ........ ................
| * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-12/+12
| | | | | | | | | | | | | | | | | | | | 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* ........
* | Close #11560: Improve test coverage of shutilNick Coghlan2011-03-161-36/+64
| |
* | Close #11548: Correctly handle format argument in shutil.unpack_archiveNick Coghlan2011-03-161-0/+8
| |
* | Fix #9333. The symlink function is always available now, raising OSErrorBrian Curtin2010-12-281-8/+4
| | | | | | | | when the user doesn't hold the symbolic link privilege rather than hiding it.
* | Temporarily disable newly failing test for the release.Georg Brandl2010-12-051-0/+3
| |
* | Now can reproduce the error on AMD64 Windows Server 2008Hirokazu Yamamoto2010-12-051-16/+21
| | | | | | | | even where os.symlink is not supported.
* | Fix #9333. Expose os.symlink on Windows only when usable.Brian Curtin2010-12-021-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege is an account privilege that is required to be held by the user. Not only must the privilege be enabled for the account, the activated privileges for the currently running application must be adjusted to enable the requested privilege. Rather than exposing an additional function to be called prior to the user's first os.symlink call, we handle the AdjustTokenPrivileges Windows API call internally and only expose os.symlink when the privilege escalation was successful. Due to the change of only exposing os.symlink when it's available, we can go back to the original test skipping methods of checking via `hasattr`.
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-10/+10
| |
* | Fix one omission in r78359Éric Araujo2010-11-061-0/+1
| |
* | More proper closing of filesAntoine Pitrou2010-10-141-4/+8
| |
* | Implement #1578269. Patch by Jason R. Coombs.Brian Curtin2010-07-081-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added Windows support for os.symlink when run on Windows 6.0 or greater, aka Vista. Previous Windows versions will raise NotImplementedError when trying to symlink. Includes numerous test updates and additions to test_os, including a symlink_support module because of the fact that privilege escalation is required in order to run the tests to ensure that the user is able to create symlinks. By default, accounts do not have the required privilege, so the escalation code will have to be exposed later (or documented on how to do so). I'll be following up with that work next. Note that the tests use ctypes, which was agreed on during the PyCon language summit.
* | Merged revisions 80830 via svnmerge fromTarek Ziadé2010-05-051-1/+105
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80830 | tarek.ziade | 2010-05-06 00:15:31 +0200 (Thu, 06 May 2010) | 1 line Fixed #4265: shutil.copyfile() was leaking file descriptors when disk fills ........
* | make sure shutil checks for bz2 availability before it uses it.Tarek Ziadé2010-04-291-1/+10
| |
* | #8295 : Added shutil.unpack_archive and related APIsTarek Ziadé2010-04-281-1/+56
| |
* | make sure os.symlink presence is tested before running some shutil tests -- ↵Tarek Ziadé2010-04-231-56/+59
| | | | | | | | also refactored the tests to use unittest.skipUnless
* | Merged revisions 80282 via svnmerge fromTarek Ziadé2010-04-201-30/+0
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80282 | tarek.ziade | 2010-04-20 23:09:06 +0200 (Tue, 20 Apr 2010) | 1 line removed ztar support in shutil.make_archive ........
* | Fixed #6547: Added the ignore_dangling_symlinks option to shutil.copytreeTarek Ziadé2010-04-201-1/+21
| |
* | Fixed #1540112: now shutil.copytree will let you provide your own copy() ↵Tarek Ziadé2010-04-191-19/+32
| | | | | | | | function
* | Merged revisions 79030-79032 via svnmerge fromFlorent Xicluna2010-03-171-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79030 | florent.xicluna | 2010-03-17 20:05:04 +0100 (mer, 17 mar 2010) | 2 lines Cleanup in test_import and test_coding. ........ r79031 | florent.xicluna | 2010-03-17 20:15:56 +0100 (mer, 17 mar 2010) | 2 lines Cleanup some test cases using check_warnings and check_py3k_warnings. ........ r79032 | florent.xicluna | 2010-03-17 21:05:11 +0100 (mer, 17 mar 2010) | 2 lines Fix and check cgi module deprecation warnings. Revert an unwanted rename in test_import. ........
* | Merged revisions 78359-78360 via svnmerge fromTarek Ziadé2010-02-231-0/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78359 | tarek.ziade | 2010-02-23 00:16:41 -0500 (Tue, 23 Feb 2010) | 1 line added make_archive (and secondary APIs) to shutil ........ r78360 | tarek.ziade | 2010-02-23 00:20:22 -0500 (Tue, 23 Feb 2010) | 1 line added a note on shutil new APIs ........
* | Merged revisions 76101 via svnmerge fromAntoine Pitrou2009-11-041-53/+57
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76101 | antoine.pitrou | 2009-11-04 01:50:26 +0100 (mer., 04 nov. 2009) | 3 lines Make test_shutil clean up after itself ........
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-12/+12
|/
* Merged revisions ↵Benjamin Peterson2009-05-081-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70768,71657,71721,71729,71794,71976,72036-72037,72079,72085,72131-72134,72191,72197-72198,72219,72221,72225,72303,72434,72467,72476 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70768 | andrew.kuchling | 2009-03-30 17:29:15 -0500 (Mon, 30 Mar 2009) | 1 line Typo fixes ........ r71657 | vinay.sajip | 2009-04-16 14:07:37 -0500 (Thu, 16 Apr 2009) | 1 line Issue #5768: Change to Unicode output logic and test case for same. ........ r71721 | benjamin.peterson | 2009-04-18 14:26:19 -0500 (Sat, 18 Apr 2009) | 1 line fix a few nits in unittest.py #5771 ........ r71729 | benjamin.peterson | 2009-04-18 16:03:10 -0500 (Sat, 18 Apr 2009) | 1 line move test to a more appropiate one ........ r71794 | vinay.sajip | 2009-04-22 07:10:47 -0500 (Wed, 22 Apr 2009) | 2 lines Issue #5170: Fixed regression caused when fixing #5768. ........ r71976 | mark.dickinson | 2009-04-26 14:54:55 -0500 (Sun, 26 Apr 2009) | 2 lines Fix typo in function name ........ r72036 | georg.brandl | 2009-04-27 12:04:23 -0500 (Mon, 27 Apr 2009) | 1 line #5848: small unittest doc patch. ........ r72037 | georg.brandl | 2009-04-27 12:09:53 -0500 (Mon, 27 Apr 2009) | 1 line #5840: dont claim we dont support TLS. ........ r72079 | r.david.murray | 2009-04-28 14:02:55 -0500 (Tue, 28 Apr 2009) | 2 lines Remove spurious 'u'. ........ r72085 | georg.brandl | 2009-04-28 16:48:35 -0500 (Tue, 28 Apr 2009) | 1 line Make the doctests in the docs pass, except for those in the turtle module. ........ r72131 | benjamin.peterson | 2009-04-29 17:43:35 -0500 (Wed, 29 Apr 2009) | 1 line fix test_shutil on ZFS #5676 ........ r72132 | georg.brandl | 2009-04-29 17:44:07 -0500 (Wed, 29 Apr 2009) | 1 line #5878: fix repr of re object. ........ r72133 | benjamin.peterson | 2009-04-29 17:44:15 -0500 (Wed, 29 Apr 2009) | 1 line make sure mode is removable while cleaning up test droppings ........ r72134 | benjamin.peterson | 2009-04-29 19:06:33 -0500 (Wed, 29 Apr 2009) | 1 line make sure to close file ........ r72191 | michael.foord | 2009-05-02 06:43:06 -0500 (Sat, 02 May 2009) | 9 lines Adds an exit parameter to unittest.main(). If False main no longer calls sys.exit. Closes issue 3379. Michael Foord ........ r72197 | benjamin.peterson | 2009-05-02 11:24:37 -0500 (Sat, 02 May 2009) | 1 line don't let sys.argv be used in the tests ........ r72198 | andrew.kuchling | 2009-05-02 12:12:15 -0500 (Sat, 02 May 2009) | 1 line Add items ........ r72219 | michael.foord | 2009-05-02 15:15:05 -0500 (Sat, 02 May 2009) | 8 lines Add addCleanup and doCleanups to unittest.TestCase. Closes issue 5679. Michael Foord ........ r72221 | benjamin.peterson | 2009-05-02 15:26:53 -0500 (Sat, 02 May 2009) | 1 line add myself ........ r72225 | michael.foord | 2009-05-02 17:43:34 -0500 (Sat, 02 May 2009) | 1 line ........ r72303 | benjamin.peterson | 2009-05-04 19:55:24 -0500 (Mon, 04 May 2009) | 1 line using sys._getframe(x), where x > 0 doesnt' work on IronPython ........ r72434 | r.david.murray | 2009-05-07 13:09:58 -0500 (Thu, 07 May 2009) | 2 lines Pre-opened test file needs to be opened in binary mode. ........ r72467 | georg.brandl | 2009-05-08 07:17:34 -0500 (Fri, 08 May 2009) | 1 line Fix name. ........ r72476 | thomas.heller | 2009-05-08 15:09:40 -0500 (Fri, 08 May 2009) | 4 lines Add a file that contains diffs between offical libffi files and the files in this repository. Should make it easier to merge new libffi versions. ........
* Merged revisions 72178 via svnmerge fromAntoine Pitrou2009-05-011-0/+33
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72178 | antoine.pitrou | 2009-05-01 22:55:35 +0200 (ven., 01 mai 2009) | 4 lines Issue #3002: `shutil.copyfile()` and `shutil.copytree()` now raise an error when a named pipe is encountered, rather than blocking infinitely. ........
* Merged revisions 69415,69591,69593 via svnmerge fromBenjamin Peterson2009-02-201-4/+4
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69415 | benjamin.peterson | 2009-02-07 13:08:22 -0600 (Sat, 07 Feb 2009) | 1 line make destinsrc private ........ r69591 | martin.v.loewis | 2009-02-13 14:26:16 -0600 (Fri, 13 Feb 2009) | 1 line Update Tix build procedure. ........ r69593 | martin.v.loewis | 2009-02-13 14:51:48 -0600 (Fri, 13 Feb 2009) | 1 line Add optional code signing after merging. ........
* Merged revisions 69100 via svnmerge fromAntoine Pitrou2009-01-291-0/+22
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69100 | antoine.pitrou | 2009-01-29 21:19:34 +0100 (jeu., 29 janv. 2009) | 5 lines Issue #2047: shutil.move() could believe that its destination path was inside its source path if it began with the same letters (e.g. "src" vs. "src.new"). ........
* Merged revisions ↵Georg Brandl2008-07-161-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64722,64729,64753,64845-64846,64849,64871,64880-64882,64885,64888,64897,64900-64901,64915,64926-64929,64938-64941,64944,64961,64966,64973 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64722 | georg.brandl | 2008-07-05 12:13:36 +0200 (Sat, 05 Jul 2008) | 4 lines #2663: support an *ignore* argument to shutil.copytree(). Patch by Tarek Ziade. This is a new feature, but Barry authorized adding it in the beta period. ........ r64729 | mark.dickinson | 2008-07-05 13:33:52 +0200 (Sat, 05 Jul 2008) | 5 lines Issue 3188: accept float('infinity') as well as float('inf'). This makes the float constructor behave in the same way as specified by various other language standards, including C99, IEEE 754r, and the IBM Decimal standard. ........ r64753 | gregory.p.smith | 2008-07-06 05:35:58 +0200 (Sun, 06 Jul 2008) | 4 lines - Issue #2862: Make int and float freelist management consistent with other freelists. Changes their CompactFreeList apis into ClearFreeList apis and calls them via gc.collect(). ........ r64845 | raymond.hettinger | 2008-07-10 16:03:19 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3301: Bisect functions behaved badly when lo was negative. ........ r64846 | raymond.hettinger | 2008-07-10 16:34:57 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3285: Fractions from_float() and from_decimal() accept Integral arguments. ........ r64849 | andrew.kuchling | 2008-07-10 16:43:31 +0200 (Thu, 10 Jul 2008) | 1 line Wording changes ........ r64871 | raymond.hettinger | 2008-07-11 14:00:21 +0200 (Fri, 11 Jul 2008) | 1 line Add cautionary note on the use of PySequence_Fast_ITEMS. ........ r64880 | amaury.forgeotdarc | 2008-07-11 23:28:25 +0200 (Fri, 11 Jul 2008) | 5 lines #3317 in zipfile module, restore the previous names of global variables: some applications relied on them. Also remove duplicated lines. ........ r64881 | amaury.forgeotdarc | 2008-07-11 23:45:06 +0200 (Fri, 11 Jul 2008) | 3 lines #3342: In tracebacks, printed source lines were not indented since r62555. #3343: Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine. ........ r64882 | josiah.carlson | 2008-07-12 00:17:14 +0200 (Sat, 12 Jul 2008) | 2 lines Fix for the AttributeError in test_asynchat. ........ r64885 | josiah.carlson | 2008-07-12 01:26:59 +0200 (Sat, 12 Jul 2008) | 2 lines Fixed test for asyncore. ........ r64888 | matthias.klose | 2008-07-12 09:51:48 +0200 (Sat, 12 Jul 2008) | 2 lines - Fix bashisms in Tools/faqwiz/move-faqwiz.sh ........ r64897 | benjamin.peterson | 2008-07-12 22:16:19 +0200 (Sat, 12 Jul 2008) | 1 line fix various doc typos #3320 ........ r64900 | alexandre.vassalotti | 2008-07-13 00:06:53 +0200 (Sun, 13 Jul 2008) | 2 lines Fixed typo. ........ r64901 | benjamin.peterson | 2008-07-13 01:41:19 +0200 (Sun, 13 Jul 2008) | 1 line #1778443 robotparser fixes from Aristotelis Mikropoulos ........ r64915 | nick.coghlan | 2008-07-13 16:52:36 +0200 (Sun, 13 Jul 2008) | 1 line Fix issue 3221 by emitting a RuntimeWarning instead of raising SystemError when the parent module can't be found during an absolute import (likely due to non-PEP 361 aware code which sets a module level __package__ attribute) ........ r64926 | martin.v.loewis | 2008-07-13 22:31:49 +0200 (Sun, 13 Jul 2008) | 2 lines Add turtle into the module index. ........ r64927 | alexandre.vassalotti | 2008-07-13 22:42:44 +0200 (Sun, 13 Jul 2008) | 3 lines Issue #3274: Use a less common identifier for the temporary variable in Py_CLEAR(). ........ r64928 | andrew.kuchling | 2008-07-13 23:43:25 +0200 (Sun, 13 Jul 2008) | 1 line Re-word ........ r64929 | andrew.kuchling | 2008-07-13 23:43:52 +0200 (Sun, 13 Jul 2008) | 1 line Add various items; move ctypes items into a subsection of their own ........ r64938 | andrew.kuchling | 2008-07-14 02:35:32 +0200 (Mon, 14 Jul 2008) | 1 line Typo fixes ........ r64939 | andrew.kuchling | 2008-07-14 02:40:55 +0200 (Mon, 14 Jul 2008) | 1 line Typo fix ........ r64940 | andrew.kuchling | 2008-07-14 03:18:16 +0200 (Mon, 14 Jul 2008) | 1 line Typo fix ........ r64941 | andrew.kuchling | 2008-07-14 03:18:31 +0200 (Mon, 14 Jul 2008) | 1 line Expand the multiprocessing section ........ r64944 | gregory.p.smith | 2008-07-14 08:06:48 +0200 (Mon, 14 Jul 2008) | 7 lines Fix posix.fork1() / os.fork1() to only call PyOS_AfterFork() in the child process rather than both parent and child. Does anyone actually use fork1()? It appears to be a Solaris thing but if Python is built with pthreads on Solaris, fork1() and fork() should be the same. ........ r64961 | jesse.noller | 2008-07-15 15:47:33 +0200 (Tue, 15 Jul 2008) | 1 line multiprocessing/connection.py patch to remove fqdn oddness for issue 3270 ........ r64966 | nick.coghlan | 2008-07-15 17:40:22 +0200 (Tue, 15 Jul 2008) | 1 line Add missing NEWS entry for r64962 ........ r64973 | jesse.noller | 2008-07-15 20:29:18 +0200 (Tue, 15 Jul 2008) | 1 line Revert 3270 patch: self._address is in pretty widespread use, need to revisit ........
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-3/+3
|