From 9d31715e1eae7853e83871b8e6483acabb9c691d Mon Sep 17 00:00:00 2001 From: danlu1 Date: Thu, 14 Nov 2024 03:16:22 +0000 Subject: [PATCH] fix index issue in Python 3.8 --- tests/test_process_functions.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_process_functions.py b/tests/test_process_functions.py index 6c722708..5e918182 100644 --- a/tests/test_process_functions.py +++ b/tests/test_process_functions.py @@ -5,8 +5,12 @@ import pytest import synapseclient from genie import process_functions -from pandas.api.types import (is_bool_dtype, is_float_dtype, is_integer_dtype, - is_string_dtype) +from pandas.api.types import ( + is_bool_dtype, + is_float_dtype, + is_integer_dtype, + is_string_dtype, +) from pandas.testing import assert_frame_equal DATABASE_DF = pd.DataFrame( @@ -655,6 +659,7 @@ def test_that_create_missing_columns_gets_expected_output_with_single_col_df( result = process_functions.create_missing_columns( dataset=test_cases["test_input"], schema=test_cases["test_schema"] ) + result.reset_index(drop=True, inplace=True) assert_frame_equal(result, test_cases["expected_output"], check_dtype=False) assert test_cases["expected_dtype"](result.iloc[:, 0]) assert result.isna().sum().sum() == test_cases["expected_na_count"]