Skip to content

Commit 6b4c10e

Browse files
committed
More tests
1 parent df28514 commit 6b4c10e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/tests/series/methods/test_value_counts.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,15 @@ def test_value_counts_bool_with_nan(self, ser, dropna, exp):
213213
[
214214
(
215215
[1 + 1j, 1 + 1j, 1, 3j, 3j, 3j],
216-
Series([3, 2, 1], index=pd.Index([3j, 1 + 1j, 1])),
217-
)
216+
Series([3, 2, 1], index=pd.Index([3j, 1 + 1j, 1], dtype=np.complex128)),
217+
),
218+
(
219+
[1 + 1j, 1 + 1j, 1, 3j, 3j, 3j],
220+
Series([3, 2, 1], index=pd.Index([3j, 1 + 1j, 1], dtype=np.complex64)),
221+
),
218222
],
219223
)
220224
def test_value_counts_complex_numbers(self, input_array, expected):
221225
# Complex Index dtype is cast to object
222226
result = Series(input_array).value_counts()
223-
tm.assert_series_equal(result, expected, check_index_type=False)
227+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)