Load ci/wasm_build.py as a module.
()
| 24 | |
| 25 | |
| 26 | def _load_wasm_build_module(): |
| 27 | """Load ci/wasm_build.py as a module.""" |
| 28 | import importlib.util |
| 29 | import sys |
| 30 | |
| 31 | spec = importlib.util.spec_from_file_location( |
| 32 | "wasm_build", PROJECT_ROOT / "ci" / "wasm_build.py" |
| 33 | ) |
| 34 | assert spec is not None, "Could not load ci/wasm_build.py" |
| 35 | assert spec.loader is not None, "No loader for ci/wasm_build.py" |
| 36 | mod = importlib.util.module_from_spec(spec) |
| 37 | saved = sys.path[:] |
| 38 | sys.path.insert(0, str(PROJECT_ROOT)) |
| 39 | try: |
| 40 | spec.loader.exec_module(mod) |
| 41 | finally: |
| 42 | sys.path[:] = saved |
| 43 | return mod |
| 44 | |
| 45 | |
| 46 | class TestLegacyCopyIsDisabled: |
no test coverage detected