Skip to content

Commit

Permalink
order missing
Browse files Browse the repository at this point in the history
  • Loading branch information
DeaMariaLeon committed Jan 11, 2025
1 parent 6f76255 commit 287713b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion narwhals/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,5 +1063,5 @@ def generate_repr(header: str, native_repr: str) -> str:

def check_column_exists(columns: list[str], subset: list[str] | None) -> None:
if subset is not None and (missing := set(subset).difference(columns)):
msg = f"Column(s) {missing} not found in {columns}"
msg = f"Column(s) {sorted(missing)} not found in {columns}"
raise ColumnNotFoundError(msg)
2 changes: 1 addition & 1 deletion tests/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,6 @@ def test_check_column_exists() -> None:
subset = ["d", "f"]
with pytest.raises(
ColumnNotFoundError,
match=re.escape("Column(s) {'f', 'd'} not found in ['a', 'b', 'c']"),
match=re.escape("Column(s) ['d', 'f'] not found in ['a', 'b', 'c']"),
):
check_column_exists(columns, subset)

0 comments on commit 287713b

Please sign in to comment.