Skip to content

Commit

Permalink
return dsc instead of yield
Browse files Browse the repository at this point in the history
Signed-off-by: lugi0 <[email protected]>
  • Loading branch information
lugi0 committed Jan 24, 2025
1 parent 7a6a42b commit 43ef389
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,9 @@ def unprivileged_client(
@pytest.fixture(scope="session")
def dsc_resource(admin_client: DynamicClient):
name = py_config["dsc_name"]
try:
for dsc in DataScienceCluster.get(dyn_client=admin_client, name=name):
yield dsc
except Exception:
raise ResourceNotFoundError
for dsc in DataScienceCluster.get(dyn_client=admin_client, name=name):
return dsc
raise ResourceNotFoundError(f"DSC resource {name} not found")


@pytest.fixture(scope="module")
Expand Down

0 comments on commit 43ef389

Please sign in to comment.