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 9fe42b49c7
)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
210358b25c
commit
20372d6524
|
@ -37,8 +37,6 @@ def tester(fn, wantResult):
|
||||||
wantResult = os.fsencode(wantResult)
|
wantResult = os.fsencode(wantResult)
|
||||||
elif isinstance(wantResult, tuple):
|
elif isinstance(wantResult, tuple):
|
||||||
wantResult = tuple(os.fsencode(r) for r in wantResult)
|
wantResult = tuple(os.fsencode(r) for r in wantResult)
|
||||||
|
|
||||||
gotResult = eval(fn)
|
|
||||||
if wantResult != gotResult:
|
if wantResult != gotResult:
|
||||||
raise TestFailed("%s should return: %s but returned: %s" \
|
raise TestFailed("%s should return: %s but returned: %s" \
|
||||||
%(str(fn), str(wantResult), repr(gotResult)))
|
%(str(fn), str(wantResult), repr(gotResult)))
|
||||||
|
|
Loading…
Reference in New Issue