[Python-checkins] bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
Miss Islington (bot)
webhook-mailer at python.org
Tue Jun 25 03:12:24 EDT 2019
https://github.com/python/cpython/commit/20372d65243d5573fba17d026681a3b24d95c284
commit: 20372d65243d5573fba17d026681a3b24d95c284
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-25T00:12:19-07:00
summary:
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 <zspytz at gmail.com>
files:
M Lib/test/test_ntpath.py
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index fc2398c2d518..92d85ecbc4fc 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)))
More information about the Python-checkins
mailing list