()
| 74 | |
| 75 | @pytest.mark.asyncio |
| 76 | async def test_simple_stream_api_without_server(): |
| 77 | api = SimpleStreamAPI() |
| 78 | api.setup(None) |
| 79 | assert api.model is not None, "Model should be loaded after setup" |
| 80 | assert api.decode_request({"input": 4}) == 4, "Request should be decoded" |
| 81 | assert list(api.predict(4)) == ["0: 4", "1: 4", "2: 4"], "Model should be able to predict" |
| 82 | assert list(api.encode_response(["0: 4", "1: 4", "2: 4"])) == [ |
| 83 | {"output": "0: 4"}, |
| 84 | {"output": "1: 4"}, |
| 85 | {"output": "2: 4"}, |
| 86 | ], "Response should be encoded" |
| 87 | |
| 88 | |
| 89 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected
searching dependent graphs…