Commit 9dd21c6c authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #25911: Tring to silence deprecation warnings in bytes path walk tests.

parents 2614d97c 709bcab0
......@@ -1020,6 +1020,17 @@ class FwalkTests(WalkTests):
class BytesWalkTests(WalkTests):
"""Tests for os.walk() with bytes."""
def setUp(self):
super().setUp()
self.stack = contextlib.ExitStack()
if os.name == 'nt':
self.stack.enter_context(warnings.catch_warnings())
warnings.simplefilter("ignore", DeprecationWarning)
def tearDown(self):
self.stack.close()
super().tearDown()
def walk(self, top, **kwargs):
if 'follow_symlinks' in kwargs:
kwargs['followlinks'] = kwargs.pop('follow_symlinks')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment