Skip to content

TST (string dtype): fix xfails in test_algos.py #60119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import numpy as np
import pytest

from pandas._config import using_string_dtype

from pandas._libs import (
algos as libalgos,
hashtable as ht,
Expand Down Expand Up @@ -1684,7 +1682,6 @@ def test_unique_complex_numbers(self, array, expected):


class TestHashTable:
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
@pytest.mark.parametrize(
"htable, data",
[
Expand All @@ -1697,7 +1694,7 @@ class TestHashTable:
)
def test_hashtable_unique(self, htable, data, writable):
# output of maker has guaranteed unique elements
s = Series(data)
s = Series(data, dtype=object if isinstance(data, list) else None)
if htable == ht.Float64HashTable:
# add NaN for float column
s.loc[500] = np.nan
Expand All @@ -1724,7 +1721,6 @@ def test_hashtable_unique(self, htable, data, writable):
reconstr = result_unique[result_inverse]
tm.assert_numpy_array_equal(reconstr, s_duplicated.values)

@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
@pytest.mark.parametrize(
"htable, data",
[
Expand All @@ -1737,7 +1733,7 @@ def test_hashtable_unique(self, htable, data, writable):
)
def test_hashtable_factorize(self, htable, writable, data):
# output of maker has guaranteed unique elements
s = Series(data)
s = Series(data, dtype=object if isinstance(data, list) else None)
if htable == ht.Float64HashTable:
# add NaN for float column
s.loc[500] = np.nan
Expand Down