Fixes tests broken by issue #27781.

This commit is contained in:
Steve Dower 2016-09-08 11:11:13 -07:00
parent ee178e6d6e
commit e58571b7ea
4 changed files with 10 additions and 6 deletions

View file

@ -132,9 +132,7 @@ class TestShutil(unittest.TestCase):
write_file(os.path.join(victim, 'somefile'), 'foo')
victim = os.fsencode(victim)
self.assertIsInstance(victim, bytes)
win = (os.name == 'nt')
with self.assertWarns(DeprecationWarning) if win else ExitStack():
shutil.rmtree(victim)
shutil.rmtree(victim)
@support.skip_unless_symlink
def test_rmtree_fails_on_symlink(self):