Commit Graph

116 Commits

Author SHA1 Message Date
Serhiy Storchaka 3a308b9f37 Issue #19856: shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep.
2014-02-11 10:30:59 +02:00
Gregory P. Smith 1093bf2c7f sort os.listxattr results before comparing it to avoid depending on the
ordering of the directory information in the underlying filesystem.
2014-01-17 12:01:22 -08:00
Antoine Pitrou 3f48ac98c0 Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
2014-01-01 02:50:45 +01:00
Antoine Pitrou 492b9893e1 Fix DeprecationWarnings in test suite 2013-12-21 22:19:46 +01:00
Zachary Ware 9fe6d86709 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:20:35 -06:00
Serhiy Storchaka 7908068627 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:18 +02:00
Antoine Pitrou ac601601ce Issue #1666318: Add a test that shutil.copytree() retains directory permissions.
Patch by Catherine Devlin.
2013-08-16 19:35:02 +02:00
Nick Coghlan 5517596c04 Close #15415: Factor out temp dir helpers to test.support
Patch by Chris Jerdonek
2013-07-28 22:11:50 +10:00
Serhiy Storchaka 12516e2c1b Issue #17746: Skip test_shutil.test_non_matching_mode when run as root or
on unsuitable platform/environment.
2013-05-28 15:50:15 +03:00
Barry Warsaw 20c08c8041 Remove unused import. 2013-04-16 11:18:53 -04:00
Barry Warsaw 618738b921 - Issue #17012: shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified.  Patch by Serhiy Storchaka.
2013-04-16 11:05:03 -04:00
Hynek Schlawack 0beab058dd #17076: Make copying of xattrs more permissive of missing FS support
Patch by Thomas Wouters.
2013-02-05 08:22:44 +01:00
Serhiy Storchaka d70127ac54 Fix pathext test for shutil.which() which was
broken after applying the patch for issue #16957.
2013-01-24 20:03:49 +02:00
Serhiy Storchaka 8bea200b98 Issue #16957: shutil.which() no longer searches a bare file name in the
current directory on Unix and no longer searches a relative file path with
a directory part in PATH directories.  Patch by Thomas Kluyver.
2013-01-23 10:44:21 +02:00
Serhiy Storchaka 80c88f4304 Fix shutil.which() test for issue #16993. 2013-01-22 10:31:36 +02:00
Serhiy Storchaka 014791f848 Issue #16993: shutil.which() now preserves the case of the path and extension
on Windows.
2013-01-21 15:00:27 +02:00
Hynek Schlawack c474c4e749 #15872: Some more Windows related tuning to shutil.rmtree tests
Turns out, the snakebite bots behave also their peculiarities.

I'm really not proud of this stream of commits. :(
2012-12-10 16:33:41 +01:00
Hynek Schlawack 87f9b46f15 #15872: Some more Windows related tuning to shutil.rmtree tests
Turns out, the snakebite bots behave also their peculiarities.

I'm really not proud of this stream of commits. :(
2012-12-10 16:29:57 +01:00
Hynek Schlawack f29b4937f7 #15872: Be flexible with appending *.* in shutil.rmtree test case
The Windows buildbots seem to be unable to agree whether they need them or not.
2012-12-10 12:02:26 +01:00
Hynek Schlawack b9e9f3e70d #15872: Be flexible with appending *.* in shutil.rmtree test case
The Windows buildbots seem to be unable to agree whether they need them or not.
2012-12-10 12:01:28 +01:00
Hynek Schlawack 9d5e0cca85 #15872: More shutil test fixes for Windows 2012-12-10 11:08:59 +01:00
Hynek Schlawack 9a4a750673 #15872: More shutil test fixes for Windows 2012-12-10 11:08:09 +01:00
Hynek Schlawack b57b094077 #15872: Fix shutil.rmtree error tests for Windows 2012-12-10 10:08:41 +01:00
Hynek Schlawack 9e8ac56e35 #15872: Fix shutil.rmtree error tests for Windows 2012-12-10 10:07:11 +01:00
Hynek Schlawack b550110f64 #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
It caused rmtree to not ignore certain errors when ignore_errors was set.

Patch by Alessandro Moura and Serhiy Storchaka.
2012-12-10 09:11:25 +01:00
Hynek Schlawack d16eacba48 #15872: Add tests for a 3.3 regression in the new fd-based shutil.rmtree
It cause shutil.rmtree not ignore all errors. Also add a test ensuring that
rmtree fails when being called on a symlink. Patch by Serhiy Storchaka.
2012-12-10 09:00:09 +01:00
Hynek Schlawack 26fe37dd3f #1492704: Backout and wait for 3.4 2012-07-19 21:41:02 +02:00
Hynek Schlawack 77d3283370 #1492704: Make shutil.copyfile() raise a distinct SameFileError
Patch by Atsuo Ishimoto.
2012-07-19 20:23:49 +02:00
Hynek Schlawack c2d481fbcd #15238: Fix xattr related shutil.copystat tests
- Loosen up test as Fedora has implicit xattrs
- Actually test the destination for xattrs

Should make Fedora buildbot green again.
2012-07-16 17:11:10 +02:00
Larry Hastings b40380667c Issue #15202: Consistently use the name "follow_symlinks" for
new parameters in os and shutil functions.  Patch by Serhiy Storchaka.
2012-07-15 10:57:38 -07:00
Larry Hastings ad5ae0456e - Issue #15238: shutil.copystat now copies Linux "extended attributes". 2012-07-14 17:55:11 -07:00
Hynek Schlawack d0f6e0a6e6 Check for all used fd-based functions in shutil.rmdir, closes #15218 2012-06-29 08:28:20 +02:00
Hynek Schlawack a75cd1ce73 #4489: Don't follow ever symlinks in rmtree
Also added several regression tests.
2012-06-28 12:07:29 +02:00
Larry Hastings 5b2f9c0aff Issue #15817: Bugfix: remove temporary directories test_shutil was leaving
behind.
2012-06-25 23:50:01 -07:00
Hynek Schlawack 3b52778c74 #4489 Make fd based rmtree work on bytes 2012-06-25 13:27:31 +02:00
Hynek Schlawack cf343532a2 Remove debug output from test_shutil 2012-06-24 16:21:22 +02:00
Ned Deily 5fddf866d8 Issue #14662: Prevent shutil failures on OS X when destination does not
support chflag operations.  (Patch by Hynek Schlawack)
2012-05-10 17:21:23 -07:00
Senthil Kumaran 0c2dba5726 Fix closes issue issue12470 - check for utime for the skipUnless condition. 2011-07-03 18:21:38 -07:00
Ronald Oussoren 78349b06af merge from 3.1 2011-05-06 10:57:22 +02:00
Ronald Oussoren f51738b10e Fix for issue 10684: Folders get deleted when trying to change case with shutil.move (case insensitive file systems only) 2011-05-06 10:23:04 +02:00
Nick Coghlan 8ed3cf3a4b Close #11560: Improve test coverage of shutil 2011-03-16 14:05:35 -04:00
Nick Coghlan abf202d798 Close #11548: Correctly handle format argument in shutil.unpack_archive 2011-03-16 13:52:20 -04:00
Brian Curtin 3b4499c5c7 Fix #9333. The symlink function is always available now, raising OSError
when the user doesn't hold the symbolic link privilege rather than hiding it.
2010-12-28 14:31:47 +00:00
Georg Brandl 724d0895e8 Temporarily disable newly failing test for the release. 2010-12-05 07:51:39 +00:00
Hirokazu Yamamoto 2668145dbd Now can reproduce the error on AMD64 Windows Server 2008
even where os.symlink is not supported.
2010-12-05 02:04:16 +00:00
Brian Curtin 52173d4959 Fix #9333. Expose os.symlink on Windows only when usable.
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`.
2010-12-02 18:29:18 +00:00
Nick Coghlan 5b0eca116a Issue #4489: Rename the feature marker for the symlink resistant rmtree and store it as a function attribute 2012-06-24 16:43:06 +10:00
Antoine Pitrou 4f6e3f74fc Avoid depending on directory iteration order in test_shutil 2012-06-23 22:05:11 +02:00
Antoine Pitrou f3a166d799 Add debug output to test_shutil 2012-06-23 21:32:36 +02:00
Antoine Pitrou 2f8a75c7a7 Proper cleanup in test_shutil, even in case of error. 2012-06-23 21:28:15 +02:00