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

Method test_import_from

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

Source from the content-addressed store, hash-verified

73 assert "np = mod.lazy_import('numpy')" in str(script)
74
75 def test_import_from(self):
76 script = Script()
77 script.add_import("example", frm="mod")
78 assert "from mod import example" in str(script)
79
80 def test_import_duplicate_froms(self):
81 script = Script()

Callers

nothing calls this directly

Calls 2

add_importMethod · 0.95
ScriptClass · 0.90

Tested by

no test coverage detected