summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imp.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r--Lib/test/test_imp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index 1a21025..35e9a2a 100644
--- a/Lib/test/test_imp.py
+++ b/Lib/test/test_imp.py
@@ -23,7 +23,7 @@ def requires_load_dynamic(meth):
"""Decorator to skip a test if not running under CPython or lacking
imp.load_dynamic()."""
meth = support.cpython_only(meth)
- return unittest.skipIf(not hasattr(imp, 'load_dynamic'),
+ return unittest.skipIf(getattr(imp, 'load_dynamic', None) is None,
'imp.load_dynamic() required')(meth)