@@ -317,36 +317,12 @@ def test_aggregation_with_distinct(self):
317317 assert result is query
318318 assert query ._query .get ("@type" ) == "Count"
319319
320- # @pytest.mark.skip(reason="""BLOCKED: Lines 852-853 in woql_query.py - edge case not covered
321-
322- # PROBLEM: Lines 852-853 handle initialization of the "and" array when woql_and()
323- # is called on a query that already has @type="And" but no "and" key yet.
324-
325- # This is an edge case that occurs when:
326- # 1. A query's cursor is manually set to {"@type": "And"} without an "and" array
327- # 2. Then woql_and() is called to add queries
328-
329- # The code checks: if "and" not in self._cursor:
330- # Then initializes: self._cursor["and"] = []
331-
332- # This edge case is difficult to trigger through normal API usage because:
333- # - woql_and() always sets both @type and initializes the "and" array
334- # - The only way to get @type="And" without "and" is through manual manipulation
335-
336- # RECOMMENDATION: This is defensive programming for an edge case that shouldn't
337- # occur in normal usage. Consider either:
338- # 1. Remove this check if it's truly unreachable through the public API
339- # 2. Add internal validation to prevent this state
340- # 3. Document this as defensive code and accept the uncovered lines
341- # """)
342320 def test_woql_and_with_uninitialized_and_array (self ):
343- """Test woql_and() when cursor has @type='And' but no 'and' array.
344-
345- This tests lines 852-853 which defensively initialize the "and" array
346- if it doesn't exist. This edge case occurs when the cursor is manually
347- manipulated to have @type="And" without the corresponding "and" array.
321+ """Test woql_and() defensive programming for uninitialized 'and' array.
348322
349- This is a TDD test showing the CORRECT expected behavior for this edge case.
323+ Tests that woql_and() properly handles the edge case where cursor has
324+ @type='And' but no 'and' array (e.g., from manual cursor manipulation).
325+ The defensive code should initialize the missing array.
350326 """
351327 query = WOQLQuery ()
352328
0 commit comments