Skip to content

Fix: always sort Python model dfs in unit tests#5575

Merged
georgesittas merged 2 commits intomainfrom
jo/sort_python_model_dfs_in_tests
Nov 3, 2025
Merged

Fix: always sort Python model dfs in unit tests#5575
georgesittas merged 2 commits intomainfrom
jo/sort_python_model_dfs_in_tests

Conversation

@georgesittas
Copy link
Contributor

We sort the expected & actual dataframes for SQL model unit tests, when the ORDER BY clause is missing. This PR makes it so that we always sort them for Python models too, since we don't have a clause like that.

The added test fails when the flag is set to False:

tests/core/test_test.py:95: AssertionError
------------------------------------------------ Captured stdout call ------------------------------------------------
AssertionError: Data mismatch (exp: expected, act: actual)

   id     value
  exp act   exp act
0   1   3     a   c
1   2   1     b   a
2   3   2     c   b

@georgesittas georgesittas requested a review from a team November 3, 2025 16:16
@georgesittas georgesittas enabled auto-merge (squash) November 3, 2025 18:58
@georgesittas georgesittas merged commit a99bfaa into main Nov 3, 2025
36 checks passed
@georgesittas georgesittas deleted the jo/sort_python_model_dfs_in_tests branch November 3, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants