MCPcopy Create free account
hub / github.com/apache/tvm-ffi / test_string

Function test_string

tests/python/test_string.py:23–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22
23def test_string() -> None:
24 fecho = tvm_ffi.get_global_func("testing.echo")
25 s = tvm_ffi.core.String("hello")
26 s2 = fecho(s)
27 assert s2 == "hello"
28 s3 = tvm_ffi.convert("hello")
29 assert isinstance(s3, str)
30
31 x = "hello long string"
32 assert fecho(x) == x
33
34 s4 = pickle.loads(pickle.dumps(s))
35 assert s4 == "hello"
36
37
38def test_bytes() -> None:

Callers

nothing calls this directly

Calls 2

StringMethod · 0.80
convertMethod · 0.45

Tested by

no test coverage detected