Skip to content

Commit aae9234

Browse files
Aadharsh-Acharyaacharyaa-umichmroeschke
authored
TST: GH32822 data types in frame manip (#46836)
* TST: GH32822 data types in frame manip * edited style * parametrize dtype * fix integration tests * Rename test, use any_int_dtype fixture Co-authored-by: Aadharsh Acharya <[email protected]> Co-authored-by: Matthew Roeschke <[email protected]>
1 parent f60675d commit aae9234

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/frame/test_arithmetic.py

+9
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,15 @@ def test_bool_frame_mult_float():
20072007
tm.assert_frame_equal(result, expected)
20082008

20092009

2010+
def test_frame_sub_nullable_int(any_int_dtype):
2011+
# GH 32822
2012+
series1 = Series([1, 2, np.nan], dtype=any_int_dtype)
2013+
series2 = Series([1, 2, 3], dtype=any_int_dtype)
2014+
expected = DataFrame([0, 0, np.nan], dtype=any_int_dtype)
2015+
result = series1.to_frame() - series2.to_frame()
2016+
tm.assert_frame_equal(result, expected)
2017+
2018+
20102019
def test_frame_op_subclass_nonclass_constructor():
20112020
# GH#43201 subclass._constructor is a function, not the subclass itself
20122021

0 commit comments

Comments
 (0)