summaryrefslogtreecommitdiff
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
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 c879fdd830..d23deee624 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -108,6 +108,15 @@ class TestShutil(unittest.TestCase):
self.tempdirs.append(d)
return d
+ def test_rmtree_works_on_bytes(self):
+ tmp = self.mkdtemp()
+ victim = os.path.join(tmp, 'killme')
+ os.mkdir(victim)
+ write_file(os.path.join(victim, 'somefile'), 'foo')
+ victim = os.fsencode(victim)
+ self.assertIsInstance(victim, bytes)
+ shutil.rmtree(victim)
+
def test_rmtree_errors(self):
# filename is guaranteed not to exist
filename = tempfile.mktemp()