Skip to content

Commit 012b1b0

Browse files
genezhangclaude
andcommitted
fix: address PR review comments
- Replace contradictory xfail+skip with @pytest.mark.skip for GraphRAG tests - Extract _check_known_xfails() helper to deduplicate VLP xfail checks - Remove unused RecursionDepthExceeded error variant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a8dd82e commit 012b1b0

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

src/render_plan/errors.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,4 @@ pub enum RenderBuildError {
4848

4949
#[error("Union has no branches to render")]
5050
EmptyUnionBranches,
51-
52-
#[error("Recursion depth exceeded ({0}): query plan is too deeply nested")]
53-
RecursionDepthExceeded(usize),
5451
}

tests/integration/matrix/test_e2e_v2.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,18 @@ class TestVariableLengthPaths:
193193
Variable-length path patterns.
194194
5 patterns x 3 schemas x 4 variations = ~60 tests
195195
"""
196-
196+
197+
@staticmethod
198+
def _check_known_xfails(pattern, schema_name):
199+
"""Mark known failing pattern+schema combinations as xfail."""
200+
if pattern == "vlp_with_path_variable" and schema_name == "social_integration":
201+
pytest.xfail("Path variable RETURN p generates non-JSON response")
202+
197203
@pytest.mark.parametrize("schema_name", list(SCHEMAS.keys()))
198204
@pytest.mark.parametrize("pattern", VLP_PATTERNS)
199205
def test_vlp_pattern(self, schema_name, pattern):
200206
"""Test VLP patterns across all schemas."""
201-
if pattern == "vlp_with_path_variable" and schema_name == "social_integration":
202-
pytest.xfail("Path variable RETURN p generates non-JSON response")
207+
self._check_known_xfails(pattern, schema_name)
203208
config = SCHEMAS[schema_name]
204209
gen = QueryGenerator(schema_name, config)
205210
query = getattr(gen, pattern)()
@@ -210,8 +215,7 @@ def test_vlp_pattern(self, schema_name, pattern):
210215
@pytest.mark.parametrize("pattern", VLP_PATTERNS)
211216
def test_vlp_variation_1(self, schema_name, pattern):
212217
"""VLP patterns - variation 1."""
213-
if pattern == "vlp_with_path_variable" and schema_name == "social_integration":
214-
pytest.xfail("Path variable RETURN p generates non-JSON response")
218+
self._check_known_xfails(pattern, schema_name)
215219
random.seed(500)
216220
config = SCHEMAS[schema_name]
217221
gen = QueryGenerator(schema_name, config)
@@ -223,8 +227,7 @@ def test_vlp_variation_1(self, schema_name, pattern):
223227
@pytest.mark.parametrize("pattern", VLP_PATTERNS)
224228
def test_vlp_variation_2(self, schema_name, pattern):
225229
"""VLP patterns - variation 2."""
226-
if pattern == "vlp_with_path_variable" and schema_name == "social_integration":
227-
pytest.xfail("Path variable RETURN p generates non-JSON response")
230+
self._check_known_xfails(pattern, schema_name)
228231
random.seed(600)
229232
config = SCHEMAS[schema_name]
230233
gen = QueryGenerator(schema_name, config)
@@ -236,8 +239,7 @@ def test_vlp_variation_2(self, schema_name, pattern):
236239
@pytest.mark.parametrize("pattern", VLP_PATTERNS)
237240
def test_vlp_variation_3(self, schema_name, pattern):
238241
"""VLP patterns - variation 3."""
239-
if pattern == "vlp_with_path_variable" and schema_name == "social_integration":
240-
pytest.xfail("Path variable RETURN p generates non-JSON response")
242+
self._check_known_xfails(pattern, schema_name)
241243
random.seed(700)
242244
config = SCHEMAS[schema_name]
243245
gen = QueryGenerator(schema_name, config)

tests/integration/test_schema_variations.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ def test_return_edge_properties(self):
158158
)
159159
assert_sql_generated(result, "follow_date", "full_name")
160160

161-
@pytest.mark.xfail(reason="GraphRAG endpoint not available in test environment")
161+
@pytest.mark.skip(reason="GraphRAG endpoint not available in test environment")
162162
def test_graphrag_expansion(self):
163-
pytest.skip("GraphRAG endpoint not available")
163+
pass
164164

165165

166166
# ============================================================================
@@ -217,9 +217,9 @@ def test_return_type_function(self):
217217
)
218218
assert_sql_generated(result)
219219

220-
@pytest.mark.xfail(reason="GraphRAG endpoint not available in test environment")
220+
@pytest.mark.skip(reason="GraphRAG endpoint not available in test environment")
221221
def test_graphrag_expansion(self):
222-
pytest.skip("GraphRAG endpoint not available")
222+
pass
223223

224224

225225
# ============================================================================
@@ -276,9 +276,9 @@ def test_return_edge_properties(self):
276276
)
277277
assert_sql_generated(result, "carrier", "flight_number")
278278

279-
@pytest.mark.xfail(reason="GraphRAG endpoint not available in test environment")
279+
@pytest.mark.skip(reason="GraphRAG endpoint not available in test environment")
280280
def test_graphrag_expansion(self):
281-
pytest.skip("GraphRAG endpoint not available")
281+
pass
282282

283283

284284
# ============================================================================
@@ -351,9 +351,9 @@ def test_return_edge_properties(self):
351351
)
352352
assert_sql_generated(result, "interactions")
353353

354-
@pytest.mark.xfail(reason="GraphRAG endpoint not available in test environment")
354+
@pytest.mark.skip(reason="GraphRAG endpoint not available in test environment")
355355
def test_graphrag_expansion(self):
356-
pytest.skip("GraphRAG endpoint not available")
356+
pass
357357

358358

359359
# ============================================================================
@@ -408,9 +408,9 @@ def test_return_edge_properties(self):
408408
)
409409
assert_sql_generated(result, "amount", "transfer_date")
410410

411-
@pytest.mark.xfail(reason="GraphRAG endpoint not available in test environment")
411+
@pytest.mark.skip(reason="GraphRAG endpoint not available in test environment")
412412
def test_graphrag_expansion(self):
413-
pytest.skip("GraphRAG endpoint not available")
413+
pass
414414

415415

416416
# ============================================================================

0 commit comments

Comments
 (0)