From 6f4e1f743e5c5ab3fd102e63675b8abbe13e215a Mon Sep 17 00:00:00 2001 From: Derin Walters Date: Fri, 6 Oct 2023 16:47:52 +0900 Subject: [PATCH] explicit dtype setting in test_add_missing_columns_dtype as it seems windows can have different interpretations of "int" (#1278, #1370) Signed-off-by: Derin Walters --- tests/core/test_schemas.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/core/test_schemas.py b/tests/core/test_schemas.py index 9006081e7..9518f12ed 100644 --- a/tests/core/test_schemas.py +++ b/tests/core/test_schemas.py @@ -502,10 +502,10 @@ def test_add_missing_columns_dtype(): """Test that missing columns are added with the correct dtype.""" ref_df = pd.DataFrame( { - "a": pd.Series([2, 5], dtype=int), - "b": pd.Series([9, 9], dtype=int), + "a": pd.Series([2, 5], dtype=np.int64), + "b": pd.Series([9, 9], dtype=np.int64), "c": pd.Series([9, 9], dtype=np.int8), - "d": pd.Series([np.nan, np.nan], dtype=float), + "d": pd.Series([np.nan, np.nan], dtype=np.float64), "e": pd.Series( [7, 7], dtype=pd.SparseDtype(dtype=np.int8, fill_value=5) ), @@ -515,10 +515,10 @@ def test_add_missing_columns_dtype(): schema = DataFrameSchema( columns={ - "a": Column(int), - "b": Column(int, default=9), + "a": Column(np.int64), + "b": Column(np.int64, default=9), "c": Column(np.int8, default=9), - "d": Column(float, default=np.nan, nullable=True), + "d": Column(np.float64, default=np.nan, nullable=True), "e": Column( pd.SparseDtype(dtype=np.int8, fill_value=5), default=7 ),