Skip to content

Commit

Permalink
Unify usage of return and yield
Browse files Browse the repository at this point in the history
  • Loading branch information
Shutgun committed Nov 28, 2020
1 parent 3c29ccd commit b80bfd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/fixtures/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def mock_device(request):
device._info = deepcopy(request.cls.device_info)
device._session = None
device._zeroconf = None
yield device
return device


@pytest.fixture()
Expand All @@ -26,4 +26,4 @@ def mock_service_browser(mocker):
@pytest.fixture()
def mock_zeroconf(mocker):
mocker.patch("zeroconf.Zeroconf.get_service_info", MockZeroconf.get_service_info)
yield Zeroconf()
return Zeroconf()
3 changes: 1 addition & 2 deletions tests/fixtures/protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

@pytest.fixture()
def mock_protobuf():
protobuf = StubProtobuf()
yield protobuf
return StubProtobuf()


@pytest.fixture()
Expand Down

0 comments on commit b80bfd6

Please sign in to comment.