mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 15:25:54 -04:00
tests: Fix test_imports_panda3d for frozen/embedded panda3d package
This commit is contained in:
parent
4f9542c96a
commit
868a4eac47
@ -9,8 +9,15 @@ import pytest
|
||||
|
||||
|
||||
def test_imports_panda3d():
|
||||
import importlib, os
|
||||
import importlib, os, sys
|
||||
import panda3d
|
||||
|
||||
# Look for panda3d.* modules in builtins - pfreeze might put them there.
|
||||
for mod in sys.builtin_module_names:
|
||||
if mod.startswith('panda3d.'):
|
||||
importlib.import_module(mod)
|
||||
|
||||
if panda3d.__spec__.origin != 'frozen':
|
||||
dir = os.path.dirname(panda3d.__file__)
|
||||
|
||||
# Iterate over the things in the panda3d package that look like modules.
|
||||
|
Loading…
x
Reference in New Issue
Block a user