summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-11 08:30:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-11 08:30:06 (GMT)
commita4b9c878e41adcd057e8610c5847c7db0a614a6a (patch)
tree3792c15b9357d57ad9d2304088eb76b4957132ca /Lib/test/test_shutil.py
parentd0b7ac55560b80eecc8b55706cb4cfe201763fdb (diff)
downloadcpython-a4b9c878e41adcd057e8610c5847c7db0a614a6a.zip
cpython-a4b9c878e41adcd057e8610c5847c7db0a614a6a.tar.gz
cpython-a4b9c878e41adcd057e8610c5847c7db0a614a6a.tar.bz2
Issue #19856: shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep.
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r--Lib/test/test_shutil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 8160f41..0e81145 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -698,6 +698,15 @@ class TestMove(unittest.TestCase):
self._check_move_dir(self.src_dir, self.dir_other_fs,
os.path.join(self.dir_other_fs, os.path.basename(self.src_dir)))
+ def test_move_dir_sep_to_dir(self):
+ self._check_move_dir(self.src_dir + os.path.sep, self.dst_dir,
+ os.path.join(self.dst_dir, os.path.basename(self.src_dir)))
+
+ @unittest.skipUnless(os.path.altsep, 'requires os.path.altsep')
+ def test_move_dir_altsep_to_dir(self):
+ self._check_move_dir(self.src_dir + os.path.altsep, self.dst_dir,
+ os.path.join(self.dst_dir, os.path.basename(self.src_dir)))
+
def test_existing_file_inside_dest_dir(self):
# A file with the same name inside the destination dir already exists.
with open(self.dst_file, "wb"):