vispy.util.tests.test_import module

Test that importing vispy subpackages do not pull in any more vispy submodules than strictly necessary.

vispy.util.tests.test_import.loaded_vispy_modules(import_module, depth=None, all_modules=False)

Import the given module in subprocess and return loaded modules

Import a certain module in a clean subprocess and return the vispy modules that are subsequently loaded. The given depth indicates the module level (i.e. depth=1 will only yield ‘vispy.app’ but not ‘vispy.app.backends’).

vispy.util.tests.test_import.test_import_nothing()

Not importing vispy should not import any vispy modules.

vispy.util.tests.test_import.test_import_vispy()

Importing vispy should only pull in other vispy.util submodule.

vispy.util.tests.test_import.test_import_vispy_app1()

Importing vispy.app should not pull in other vispy submodules.

vispy.util.tests.test_import.test_import_vispy_app2()

Importing vispy.app should not pull in any backend toolkit.

vispy.util.tests.test_import.test_import_vispy_gloo()

Importing vispy.gloo should not pull in other vispy submodules.

vispy.util.tests.test_import.test_import_vispy_no_pyopengl()

Importing vispy.gloo.gl.gl2 should not import PyOpenGL.

vispy.util.tests.test_import.test_import_vispy_pyopengl()

Importing vispy.gloo.gl.pyopengl2 should import PyOpenGL.

vispy.util.tests.test_import.test_import_vispy_scene()

Importing vispy.gloo.gl.desktop should not import PyOpenGL.

vispy.util.tests.test_import.test_import_vispy_util()

Importing vispy.util should not pull in other vispy submodules.