|
4 | 4 | from neo4j import Driver, GraphDatabase |
5 | 5 |
|
6 | 6 | from graphdatascience import GraphDataScience |
7 | | -from graphdatascience.query_runner.neo4j_query_runner import Neo4jQueryRunner |
8 | 7 | from graphdatascience.server_version.server_version import ServerVersion |
9 | 8 | from graphdatascience.tests.integration.conftest import AUTH, URI |
10 | 9 |
|
@@ -210,20 +209,20 @@ def test_forward_server_side_warning(gds: GraphDataScience) -> None: |
210 | 209 |
|
211 | 210 |
|
212 | 211 | @pytest.mark.filterwarnings("ignore: notification warnings are a preview feature") |
| 212 | +@pytest.mark.compatible_with_db_driver(min_inclusive=ServerVersion(5, 21, 0)) |
213 | 213 | def test_forward_driver_configured_warning(warning_driver: Driver) -> None: |
214 | | - if Neo4jQueryRunner._NEO4J_DRIVER_VERSION >= ServerVersion(5, 21, 0): |
215 | | - gds = GraphDataScience(warning_driver) |
| 214 | + gds = GraphDataScience(warning_driver) |
216 | 215 |
|
217 | | - with pytest.raises(Warning, match="The query used a deprecated function: `id`."): |
218 | | - gds.run_cypher("MATCH (n) RETURN id(n)") |
| 216 | + with pytest.raises(Warning, match="The query used a deprecated function: `id`."): |
| 217 | + gds.run_cypher("MATCH (n) RETURN id(n)") |
219 | 218 |
|
220 | 219 |
|
221 | 220 | def test_filter_out_client_related__warning(gds: GraphDataScience) -> None: |
222 | 221 | gds.graph.drop("g", failIfMissing=False) |
223 | 222 |
|
224 | 223 |
|
225 | 224 | @pytest.mark.filterwarnings("ignore: notification warnings are a preview feature") |
| 225 | +@pytest.mark.compatible_with_db_driver(min_inclusive=ServerVersion(5, 21, 0)) |
226 | 226 | def test_filter_out_client_related__driver_configured_warning(warning_driver: Driver) -> None: |
227 | | - if Neo4jQueryRunner._NEO4J_DRIVER_VERSION >= ServerVersion(5, 21, 0): |
228 | | - gds = GraphDataScience(warning_driver) |
229 | | - gds.graph.drop("g", failIfMissing=False) |
| 227 | + gds = GraphDataScience(warning_driver) |
| 228 | + gds.graph.drop("g", failIfMissing=False) |
0 commit comments