Closed ssolson closed 2 months ago
Pulls to develop have been failing in the D3D module for an int32 vs int64 index in the d3d io module specifically on windows builds.
develop
int32
int64
This PR ignores those differences and thereby fixes the failing tests.
Example of test failure output below:
================================== FAILURES =================================== _________________ TestIO.test_create_points_array_like_inputs _________________ self = <mhkit.tests.river.test_io_d3d.TestIO testMethod=test_create_points_array_like_inputs> def test_create_points_array_like_inputs(self): """ Test array-like inputs such as lists. """ result = river.io.d3d.create_points([1, 2], [3, 4], [5, 6]) expected = pd.DataFrame( {"x": [1, 2, 1, 2], "y": [3, 4, 3, 4], "waterdepth": [5, 5, 6, 6]} ) > pd.testing.assert_frame_equal( result, expected, check_dtype=False, check_names=False ) mhkit\tests\river\test_io_d3d.py:1[70](https://github.com/MHKiT-Software/MHKiT-Python/actions/runs/8558019568/job/23459345139#step:7:71): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ left = Index([0, 1, 2, 3], dtype='int32', name='index') right = RangeIndex(start=0, stop=4, step=1), obj = 'DataFrame.index' def _check_types(left, right, obj: str = "Index") -> None: if not exact: return assert_class_equal(left, right, exact=exact, obj=obj) assert_attr_equal("inferred_type", left, right, obj=obj) # Skip exact dtype checking when `check_categorical` is False if is_categorical_dtype(left.dtype) and is_categorical_dtype(right.dtype): if check_categorical: assert_attr_equal("dtype", left, right, obj=obj) assert_index_equal(left.categories, right.categories, exact=exact) return > assert_attr_equal("dtype", left, right, obj=obj) E AssertionError: DataFrame.index are different E E Attribute "dtype" are different E [left]: int32 E [right]: int64
Pulls to
develop
have been failing in the D3D module for anint32
vsint64
index in the d3d io module specifically on windows builds.This PR ignores those differences and thereby fixes the failing tests.
Example of test failure output below: