Browse Source

tests: fix test_imports not to import things starting with 'lib'

rdb 6 years ago
parent
commit
53ff35dd6e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tests/test_imports.py

+ 5 - 0
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):]