@@ -215,24 +215,15 @@ def test_series_equal_numeric_values_mismatch(rtol):
215
215
216
216
217
217
def test_series_equal_categorical_values_mismatch (rtol , using_infer_string ):
218
- if using_infer_string :
219
- msg = """Series are different
220
-
221
- Series values are different \\ (66\\ .66667 %\\ )
222
- \\ [index\\ ]: \\ [0, 1, 2\\ ]
223
- \\ [left\\ ]: \\ ['a', 'b', 'c'\\ ]
224
- Categories \\ (3, str\\ ): \\ [a, b, c\\ ]
225
- \\ [right\\ ]: \\ ['a', 'c', 'b'\\ ]
226
- Categories \\ (3, str\\ ): \\ [a, b, c\\ ]"""
227
- else :
228
- msg = """Series are different
218
+ dtype = "str" if using_infer_string else "object"
219
+ msg = f"""Series are different
229
220
230
221
Series values are different \\ (66\\ .66667 %\\ )
231
222
\\ [index\\ ]: \\ [0, 1, 2\\ ]
232
223
\\ [left\\ ]: \\ ['a', 'b', 'c'\\ ]
233
- Categories \\ (3, object \\ ): \\ ['a', 'b', 'c'\\ ]
224
+ Categories \\ (3, { dtype } \\ ): \\ ['a', 'b', 'c'\\ ]
234
225
\\ [right\\ ]: \\ ['a', 'c', 'b'\\ ]
235
- Categories \\ (3, object \\ ): \\ ['a', 'b', 'c'\\ ]"""
226
+ Categories \\ (3, { dtype } \\ ): \\ ['a', 'b', 'c'\\ ]"""
236
227
237
228
s1 = Series (Categorical (["a" , "b" , "c" ]))
238
229
s2 = Series (Categorical (["a" , "c" , "b" ]))
0 commit comments