Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dd50b0a + 41ad77c commit 304e542Copy full SHA for 304e542
1 file changed
Lib/test/test_shutil.py
@@ -10,6 +10,7 @@
10
import errno
11
import functools
12
import subprocess
13
+from contextlib import ExitStack
14
from test import support
15
from test.support import TESTFN
16
from os.path import splitdrive
@@ -122,7 +123,9 @@ def test_rmtree_works_on_bytes(self):
122
123
write_file(os.path.join(victim, 'somefile'), 'foo')
124
victim = os.fsencode(victim)
125
self.assertIsInstance(victim, bytes)
- shutil.rmtree(victim)
126
+ win = (os.name == 'nt')
127
+ with self.assertWarns(DeprecationWarning) if win else ExitStack():
128
+ shutil.rmtree(victim)
129
130
@support.skip_unless_symlink
131
def test_rmtree_fails_on_symlink(self):
0 commit comments