Skip to content

Backport PR #31594: TST: troubleshoot npdev build #31610

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

Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,6 @@ def _set_value(self, label, value, takeable: bool = False):
else:
self.index._engine.set_value(self._values, label, value)
except (KeyError, TypeError):

# set using a non-recursive method
self.loc[label] = value

Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/dtypes/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,8 @@ def test__get_dtype(input_param, result):
)
def test__get_dtype_fails(input_param, expected_error_message):
# python objects
# 2020-02-02 npdev changed error message
expected_error_message += f"|Cannot interpret '{input_param}' as a data type"
with pytest.raises(TypeError, match=expected_error_message):
com._get_dtype(input_param)

Expand Down
7 changes: 6 additions & 1 deletion pandas/tests/dtypes/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ def test_equality_invalid(self):
assert not is_dtype_equal(self.dtype, np.int64)

def test_numpy_informed(self):
with pytest.raises(TypeError, match="data type not understood"):
# npdev 2020-02-02 changed from "data type not understood" to
# "Cannot interpret 'foo' as a data type"
msg = "|".join(
["data type not understood", "Cannot interpret '.*' as a data type"]
)
with pytest.raises(TypeError, match=msg):
np.dtype(self.dtype)

assert not self.dtype == np.str_
Expand Down