From 53ff35dd6ef776410251e8ef564a0adb994d961e Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 6 Sep 2019 13:43:25 +0200 Subject: [PATCH] tests: fix test_imports not to import things starting with 'lib' --- tests/test_imports.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_imports.py b/tests/test_imports.py index 7dd4f0deee..c1f62c8c09 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -13,11 +13,16 @@ def test_imports_panda3d(): import panda3d dir = os.path.dirname(panda3d.__file__) + # Iterate over the things in the panda3d package that look like modules. extensions = set() for suffix in imp.get_suffixes(): extensions.add(suffix[0]) for basename in os.listdir(dir): + if basename.startswith('lib'): + # This not a Python module. + return + module = basename.split('.', 1)[0] ext = basename[len(module):]