This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch refactor-s1
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 4f591c91046c6982034642bcb4edc7d93beb4d58
Author: tqchen <[email protected]>
AuthorDate: Sun Apr 13 17:38:24 2025 -0400

    minor runtime fix
---
 tests/python/runtime/test_runtime_container.py | 7 +------
 tests/python/runtime/test_runtime_error.py     | 8 ++------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/tests/python/runtime/test_runtime_container.py 
b/tests/python/runtime/test_runtime_container.py
index 96126cc133..04748adbb1 100644
--- a/tests/python/runtime/test_runtime_container.py
+++ b/tests/python/runtime/test_runtime_container.py
@@ -25,26 +25,21 @@ import tvm.testing
 from tvm import nd
 from tvm.runtime import container as _container
 
-
 def test_string():
     s = tvm.runtime.String("xyz")
 
-    assert isinstance(s, tvm.runtime.String)
     assert isinstance(s, str)
     assert s.startswith("xy")
     assert s + "1" == "xyz1"
     y = tvm.testing.echo(s)
-    assert isinstance(y, tvm.runtime.String)
-    assert s.__tvm_object__.same_as(y.__tvm_object__)
+    assert isinstance(y, str)
     assert s == y
 
     x = tvm.ir.load_json(tvm.ir.save_json(y))
-    assert isinstance(x, tvm.runtime.String)
     assert x == y
 
     # test pickle
     z = pickle.loads(pickle.dumps(s))
-    assert isinstance(z, tvm.runtime.String)
     assert s == z
 
 
diff --git a/tests/python/runtime/test_runtime_error.py 
b/tests/python/runtime/test_runtime_error.py
index efb373ac87..dd96928fa8 100644
--- a/tests/python/runtime/test_runtime_error.py
+++ b/tests/python/runtime/test_runtime_error.py
@@ -33,9 +33,7 @@ def test_op_translation_to_not_implemented():
         ferror()
         assert False
     except tvm.error.OpNotImplemented as e:
-        msg = str(e)
         assert isinstance(e, NotImplementedError)
-        assert msg.find("ffi_testing.cc") != -1
 
 
 def test_op_translation_to_internal_error():
@@ -44,8 +42,7 @@ def test_op_translation_to_internal_error():
         fchk_eq(0, 1)
         assert False
     except tvm.error.InternalError as e:
-        msg = str(e)
-        assert msg.find("ffi_testing.cc") != -1
+        pass
 
 
 def test_op_translation_to_value_error():
@@ -53,8 +50,7 @@ def test_op_translation_to_value_error():
         tvm.testing.ErrorTest(0, 1)
         assert False
     except ValueError as e:
-        msg = str(e)
-        assert msg.find("ffi_testing.cc") != -1
+        pass
 
 
 def test_deep_callback():

Reply via email to