|
18 | 18 | isna,
|
19 | 19 | )
|
20 | 20 | import pandas._testing as tm
|
21 |
| -from pandas._testing._hypothesis import ( |
22 |
| - DATETIME_JAN_1_1900_OPTIONAL_TZ, |
23 |
| - OPTIONAL_ONE_OF_ALL, |
24 |
| -) |
| 21 | +from pandas._testing._hypothesis import OPTIONAL_ONE_OF_ALL |
25 | 22 |
|
26 | 23 |
|
27 | 24 | @pytest.fixture(params=["default", "float_string", "mixed_float", "mixed_int"])
|
@@ -1023,12 +1020,12 @@ def test_where_producing_ea_cond_for_np_dtype():
|
1023 | 1020 |
|
1024 | 1021 |
|
1025 | 1022 | @pytest.mark.parametrize(
|
1026 |
| - "replacement", [0.001, True, "snake", DATETIME_JAN_1_1900_OPTIONAL_TZ] |
| 1023 | + "replacement", [0.001, True, "snake", None, datetime(2022, 5, 4)] |
1027 | 1024 | )
|
1028 | 1025 | def test_where_int_overflow(replacement):
|
1029 | 1026 | # GH 31687
|
1030 |
| - df = DataFrame([[1.0, 2e19, "nine"], [np.nan, 0.1, None]]) |
| 1027 | + df = DataFrame([[1.0, 2e25, "nine"], [np.nan, 0.1, None]]) |
1031 | 1028 | result = df.where(pd.notnull(df), replacement)
|
1032 |
| - expected = DataFrame([[1.0, 2e19, "nine"], [replacement, 0.1, replacement]]) |
| 1029 | + expected = DataFrame([[1.0, 2e25, "nine"], [replacement, 0.1, replacement]]) |
1033 | 1030 |
|
1034 | 1031 | tm.assert_frame_equal(result, expected)
|
0 commit comments