Test that importing flexx subpackages does not pull in any more flexx submodules than strictly necessary, and not any more 3d party dependencies than expected. """ import os import sys import subprocess from flexx.util.testing import run_tests_if_main, raises, skipif import flexx # https://docs.pytest.org/en/latest/skipping.html pytestmark = skipif( '__pypy__' in sys.builtin_module_names and os.getenv('TRAVIS', '') == 'true', reason='These import tests are slow on pypy') # minimum that will be imported when importing flexx PROJECT_MODULE = flexx MIN_MODULES = ['flexx', 'flexx.util', 'flexx._config'] PROJECT_NAME = 'flexx' ## Generic code def loaded_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 projects modules that are subsequently loaded. The given depth indicates the module level (i.e. depth=1 will only yield 'X.app'
Test that importing flexx subpackages does not pull in any more flexx submodules than strictly necessary, and not any more 3d party dependencies than expected. """ import os import sys import subprocess from flexx.util.testing import run_tests_if_main, raises, skipif import flexx # https://docs.pytest.org/en/latest/skipping.html pytestmark = skipif('__pypy__' in sys.builtin_module_names and os.getenv('TRAVIS', '') == 'true', reason='These import tests are slow on pypy') # minimum that will be imported when importing flexx PROJECT_MODULE = flexx MIN_MODULES = ['flexx', 'flexx.util', 'flexx._config'] PROJECT_NAME = 'flexx' ## Generic code def loaded_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 projects modules that are subsequently loaded. The given depth