Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

ci: handle print code test case failure (#9055)

Shahmir Varqha46589015cf10
diff --git a/tests/_plugins/ui/_impl/dataframes/test_print_code.py b/tests/_plugins/ui/_impl/dataframes/test_print_code.py
index 2275a683de..97fbaa50cc 100644
--- a/tests/_plugins/ui/_impl/dataframes/test_print_code.py
+++ b/tests/_plugins/ui/_impl/dataframes/test_print_code.py
@@ -497,10 +497,12 @@ def test_print_code_result_matches_actual_transform_pandas(
]
if sortable_cols:
code_result = code_result.sort_values(
- by=sortable_cols
+ by=sortable_cols,
+ key=lambda col: col.astype(str),
).reset_index(drop=True)
real_result = real_result.sort_values(
- by=sortable_cols
+ by=sortable_cols,
+ key=lambda col: col.astype(str),
).reset_index(drop=True)
pd.testing.assert_frame_equal(code_result, real_result)