This message was deleted.
# ask-for-help
s
This message was deleted.
👍 1
v
It’s odd that it seems to launch a test bento server when trying to run the unit tests. Shouldn’t there be a way to supply mock/test dependencies to the inference service to be able to write unit tests?
c
we will add some more example for unit testing, you’re right that example was more of an e2e test of a Bento
gratitude thank you 1
Just curious, in your Unit tests, do you expect to load the actual model? or ideally you will mock all the runner calls?
v
Yeah, ideally we’d have few e2e unit tests with the actual model and others with a mock runner/model.
Has anyone had success defining an inference service without putting the
svc
,
model
and
runner
in the global module level state to make it testable?
c
yes you should be able to do that
I’m planning to add some more unit test for this example project for references btw https://github.com/bentoml/CLIP-API-service
This product have model and runners defined I. Different files too