MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / test_lazy_import

Method test_lazy_import

tools/Polygraphy/tests/tools/test_script.py:70–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 assert make_invocable_if_nondefault("Dummy", x=None) is None
69
70 def test_lazy_import(self):
71 script = Script()
72 script.add_import("numpy", imp_as="np")
73 assert "np = mod.lazy_import('numpy')" in str(script)
74
75 def test_import_from(self):
76 script = Script()

Callers

nothing calls this directly

Calls 2

add_importMethod · 0.95
ScriptClass · 0.90

Tested by

no test coverage detected