mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
tests: Replace use of deprecated imp module in test_imports
This commit is contained in:
parent
bf2bf37e67
commit
4c58eb3382
@ -9,14 +9,12 @@ import pytest
|
|||||||
|
|
||||||
|
|
||||||
def test_imports_panda3d():
|
def test_imports_panda3d():
|
||||||
import imp, importlib, os
|
import importlib, os
|
||||||
import panda3d
|
import panda3d
|
||||||
dir = os.path.dirname(panda3d.__file__)
|
dir = os.path.dirname(panda3d.__file__)
|
||||||
|
|
||||||
# Iterate over the things in the panda3d package that look like modules.
|
# Iterate over the things in the panda3d package that look like modules.
|
||||||
extensions = set()
|
extensions = set(importlib.machinery.all_suffixes())
|
||||||
for suffix in imp.get_suffixes():
|
|
||||||
extensions.add(suffix[0])
|
|
||||||
|
|
||||||
for basename in os.listdir(dir):
|
for basename in os.listdir(dir):
|
||||||
if basename.startswith('lib'):
|
if basename.startswith('lib'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user