diff options
author | Brett Cannon <brett@python.org> | 2015-02-27 17:13:35 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2015-02-27 17:13:35 (GMT) |
commit | 8004e8577cd894bbf1a1edce75cfb6802dd7d270 (patch) | |
tree | e388703c44997a9a59cbe15a82b2e6c326d74931 /Lib/test/test_importlib | |
parent | e2bda9ad68af6d6fcee8e8274e02b19719c06bf0 (diff) | |
download | cpython-8004e8577cd894bbf1a1edce75cfb6802dd7d270.zip cpython-8004e8577cd894bbf1a1edce75cfb6802dd7d270.tar.gz cpython-8004e8577cd894bbf1a1edce75cfb6802dd7d270.tar.bz2 |
Issue #22834: Drop a redundant comment and use errno instead of an
integer.
Thanks to Serhiy Storchaka and Martin Panter for the suggestions.
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r-- | Lib/test/test_importlib/import_/test_path.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_importlib/import_/test_path.py b/Lib/test/test_importlib/import_/test_path.py index f257f11..c246d69 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=['']): |