MCPcopy Create free account
hub / github.com/FastLED/FastLED / _load_wasm_build_module

Function _load_wasm_build_module

tests/test_wasm_template_copy.py:26–43  ·  view source on GitHub ↗

Load ci/wasm_build.py as a module.

()

Source from the content-addressed store, hash-verified

24
25
26def _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
46class TestLegacyCopyIsDisabled:

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected