Skip to content

Commit

Permalink
Explicitly invoke clean_up instead of making it a fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenreichardt committed Oct 8, 2024
1 parent 1dd4553 commit 8333c77
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions graphdatascience/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def gds() -> Generator[GraphDataScience, None, None]:

yield _gds

clean_up(_gds)
_gds.close()


Expand All @@ -75,6 +76,7 @@ def gds_with_tls() -> Generator[GraphDataScience, None, None]:

yield _gds

clean_up(_gds)
_gds.close()


Expand All @@ -85,6 +87,7 @@ def gds_without_arrow() -> Generator[GraphDataScience, None, None]:

yield _gds

clean_up(_gds)
_gds.close()


Expand All @@ -102,13 +105,7 @@ def gds_with_cloud_setup(request: pytest.FixtureRequest) -> Generator[AuraGraphD
_gds.close()


@pytest.fixture(autouse=True)
def clean_up(gds: GraphDataScience, request: pytest.FixtureRequest) -> Generator[None, None, None]:
if "cloud_architecture" in request.keywords:
return

yield

def clean_up(gds: GraphDataScience):
res = gds.graph.list()
for graph_name in res["graphName"]:
gds.graph.drop(graph_name, failIfMissing=True)
Expand Down

0 comments on commit 8333c77

Please sign in to comment.