Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Gonzalez-Martin committed Aug 5, 2021
1 parent 6eb964d commit 7fbc38f
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/test_mlserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from inspect import iscoroutine

import pytest
from mlserver.codecs import NumpyCodec
from mlserver.settings import ModelSettings
from mlserver.types import InferenceRequest, RequestInput
from mlserver.codecs import NumpyCodec
from pytest_cases import fixture, parametrize_with_cases
from pytest_cases.common_pytest_lazy_values import is_lazy

Expand All @@ -16,11 +16,7 @@

@pytest.fixture
def inference_request() -> InferenceRequest:
return InferenceRequest(
inputs=[
RequestInput(name="payload", shape=[4], data=[1, 2, 3, 4], datatype="FP32")
]
)
return InferenceRequest(inputs=[RequestInput(name="payload", shape=[4], data=[1, 2, 3, 4], datatype="FP32")])


@fixture
Expand All @@ -44,9 +40,7 @@ async def test_load(mlserver_runtime: InferenceRuntime):
assert isinstance(mlserver_runtime._model, BaseModel)


async def test_predict(
mlserver_runtime: InferenceRuntime, inference_request: InferenceRequest
):
async def test_predict(mlserver_runtime: InferenceRuntime, inference_request: InferenceRequest):
# NOTE: pytest-cases doesn't wait for async fixtures
# TODO: Raise issue in pytest-cases repo
mlserver_runtime = await mlserver_runtime
Expand All @@ -68,9 +62,7 @@ async def test_predict(
assert expected_output.tolist() == pipeline_output.__root__


async def test_load_wrapped_class(
inference_pipeline_class, inference_request: InferenceRequest
):
async def test_load_wrapped_class(inference_pipeline_class, inference_request: InferenceRequest):
codec = NumpyCodec()
pipeline_input = codec.decode(inference_request.inputs[0])

Expand Down

0 comments on commit 7fbc38f

Please sign in to comment.