#4489 Make fd based rmtree work on bytes
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index c879fdd..d23deee 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -108,6 +108,15 @@
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()