Skip to content

Commit 0c920b8

Browse files
authored
integer array creation test GH#31104 (#51982)
Signed-off-by: Liang Yan <[email protected]>
1 parent 1fcdba2 commit 0c920b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/arrays/integer/test_construction.py

+7
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,10 @@ def test_to_integer_array(values, to_dtype, result_dtype):
234234
assert result.dtype == result_dtype()
235235
expected = pd.array(values, dtype=result_dtype())
236236
tm.assert_extension_array_equal(result, expected)
237+
238+
239+
def test_integer_array_from_boolean():
240+
# GH31104
241+
expected = pd.array(np.array([True, False]), dtype="Int64")
242+
result = pd.array(np.array([True, False], dtype=object), dtype="Int64")
243+
tm.assert_extension_array_equal(result, expected)

0 commit comments

Comments
 (0)