ophirfrish commented on a change in pull request #9074:
URL: https://github.com/apache/tvm/pull/9074#discussion_r756627635



##########
File path: tests/python/driver/tvmc/test_frontends.py
##########
@@ -367,3 +383,39 @@ def _is_layout_transform(node):
     tvm.relay.analysis.post_order_visit(after["main"], _is_layout_transform)
 
     assert not any(layout_transform_calls), "Unexpected 'layout_transform' 
call"
+
+
+def test_import_keras_friendly_message(keras_resnet50, monkeypatch):
+    # keras is part of tensorflow
+    monkeypatch.setattr("importlib.import_module", 
mock_error_on_name("tensorflow"))
+
+    with pytest.raises(TVMCImportError) as e:
+        _ = tvmc.frontends.load_model(keras_resnet50, model_format="keras")

Review comment:
       I have added the match option. Since the test function calls 
tvmc.frontends.load_model, the match string is different the the one you have 
suggested.
   This fix was done to all test cases




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to