summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-11 08:30:59 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-11 08:30:59 (GMT)
commit3a308b9f374da7f11df888f104dae6464e81d73d (patch)
tree2c2c4c76ca9945fd642051dacb2d2dc235a11b76 /Lib/test/test_shutil.py
parentc2f665e721e4e4629cc4a2c5eb6464c3dc7325e3 (diff)
downloadcpython-3a308b9f374da7f11df888f104dae6464e81d73d.zip
cpython-3a308b9f374da7f11df888f104dae6464e81d73d.tar.gz
cpython-3a308b9f374da7f11df888f104dae6464e81d73d.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 ac00cc4..c3fb8a7 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1481,6 +1481,15 @@ class TestMove(unittest.TestCase):
# Move a dir inside an existing dir on another filesystem.
self.test_move_dir_to_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"):