From: Brett Cannon Date: Fri, 27 Feb 2015 17:13:35 +0000 (-0500) Subject: Issue #22834: Drop a redundant comment and use errno instead of an X-Git-Tag: v3.5.0a2~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8004e8577cd894bbf1a1edce75cfb6802dd7d270;p=python Issue #22834: Drop a redundant comment and use errno instead of an integer. Thanks to Serhiy Storchaka and Martin Panter for the suggestions. --- diff --git a/Lib/test/test_importlib/import_/test_path.py b/Lib/test/test_importlib/import_/test_path.py index f257f117b4..c246d6973f 100644 --- a/Lib/test/test_importlib/import_/test_path.py +++ b/Lib/test/test_importlib/import_/test_path.py @@ -3,6 +3,7 @@ from .. import util importlib = util.import_importlib('importlib') machinery = util.import_importlib('importlib.machinery') +import errno import os import sys import tempfile @@ -167,8 +168,7 @@ class FinderTests: with tempfile.TemporaryDirectory() as path: os.chdir(path) except OSError as exc: - if exc.errno == 22: - # issue #22834 + if exc.errno == errno.EINVAL: self.skipTest("platform does not allow the deletion of the cwd") raise with util.import_state(path=['']):