Skip to content

Commit 396e22a

Browse files
codewizdaveclaude
andcommitted
test: Update duplicate columns test to expect rejection
- Update test_duplicate_columns_merge to expect error for duplicate column specs - Align unit test with command test behavior - Test now checks for helpful error message when column is specified multiple times Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent fa6a786 commit 396e22a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/unit/operations/test_aggregating.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ def test_avg_in_list_normalizes_to_mean(self):
119119
assert specs == {"Sales": ["sum", "mean", "count"]}
120120

121121
def test_duplicate_columns_merge(self):
122-
"""Test that duplicate column specs merge functions."""
122+
"""Test that duplicate column specs are rejected with helpful error."""
123123
result = parse_aggregation_specs("Sales:sum,Sales:mean")
124124

125-
assert is_ok(result)
126-
specs = unwrap(result)
127-
assert specs == {"Sales": ["sum", "mean"]}
125+
assert is_err(result)
126+
error = unwrap_err(result)
127+
assert isinstance(error, InvalidFormatError)
128+
assert "Sales" in str(error)
129+
assert "specified multiple times" in str(error)
128130

129131
def test_missing_colon_error(self):
130132
"""Test error when colon is missing."""

0 commit comments

Comments
 (0)