]> granicus.if.org Git - python/commitdiff
bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
authorZackery Spytz <zspytz@gmail.com>
Tue, 25 Jun 2019 06:49:46 +0000 (00:49 -0600)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 25 Jun 2019 06:49:46 +0000 (09:49 +0300)
eval() was being called an extra time without a filter for
deprecation warnings.

Lib/test/test_ntpath.py

index fc2398c2d518ba19ab734278842b95377b9f1377..92d85ecbc4fcfed4ec0bb0c3aff95f389ba99c07 100644 (file)
@@ -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)))