From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 25 Jun 2019 07:12:29 +0000 (-0700) Subject: bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357) X-Git-Tag: v3.7.5rc1~307 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=695d7ad710de17b33870d34e0fff04a31f0f3e2b;p=thirdparty%2FPython%2Fcpython.git bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357) eval() was being called an extra time without a filter for deprecation warnings. (cherry picked from commit 9fe42b49c79c453d905d0395150ba0607fbab18b) Co-authored-by: Zackery Spytz --- diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 6e31b6441122..52ddc18c7e46 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -37,8 +37,6 @@ def tester(fn, wantResult): wantResult = os.fsencode(wantResult) elif isinstance(wantResult, tuple): wantResult = tuple(os.fsencode(r) for r in wantResult) - - gotResult = eval(fn) if wantResult != gotResult: raise TestFailed("%s should return: %s but returned: %s" \ %(str(fn), str(wantResult), repr(gotResult)))