Skip to content

Commit 07a818a

Browse files
committed
Skip warning test for Neo4j 44
only emits warning for Neo4j >5
1 parent db0f0c6 commit 07a818a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

graphdatascience/tests/integration/test_model_ops.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from graphdatascience.model.node_regression_model import NRModel
1212
from graphdatascience.query_runner.neo4j_query_runner import Neo4jQueryRunner
1313
from graphdatascience.server_version.server_version import ServerVersion
14+
from graphdatascience.tests.integration.conftest import is_neo4j_44
1415

1516
PIPE_NAME = "pipe"
1617

@@ -166,13 +167,14 @@ def gs_model(runner: Neo4jQueryRunner, gds: GraphDataScience, G: Graph) -> Gener
166167
@pytest.mark.model_store_location
167168
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 5, 0))
168169
def test_beta_alpha_endpoints_25(gds: GraphDataScience, lp_model: LPModel) -> None:
169-
with pytest.warns(DeprecationWarning):
170-
gds.beta.model.list(lp_model)
171-
gds.beta.model.exists(lp_model.name())
172-
gds.alpha.model.store(lp_model)
173-
gds.beta.model.drop(lp_model)
174-
gds.alpha.model.load(lp_model.name())
175-
gds.alpha.model.publish(lp_model)
170+
if not is_neo4j_44(gds):
171+
with pytest.warns(DeprecationWarning):
172+
gds.beta.model.list(lp_model)
173+
gds.beta.model.exists(lp_model.name())
174+
gds.alpha.model.store(lp_model)
175+
gds.beta.model.drop(lp_model)
176+
gds.alpha.model.load(lp_model.name())
177+
gds.alpha.model.publish(lp_model)
176178

177179

178180
@pytest.mark.model_store_location

0 commit comments

Comments
 (0)