From ff5540ee7665f72c21f9c38d1e6e133671e4d1b6 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 8 May 2026 14:50:30 +0000 Subject: [PATCH 1/3] fix: wrap tab.columns in list() for assert_equal comparison np.testing.assert_equal raises ValueError when comparing a pandas Index directly against a list because the truth value of an array is ambiguous. https://claude.ai/code/session_01R1Zn4U6BEuWmXXeCPy1mJs --- pydatview/plugins/tests/test_standardizeUnits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydatview/plugins/tests/test_standardizeUnits.py b/pydatview/plugins/tests/test_standardizeUnits.py index bfa9540..7c44785 100644 --- a/pydatview/plugins/tests/test_standardizeUnits.py +++ b/pydatview/plugins/tests/test_standardizeUnits.py @@ -18,7 +18,7 @@ def test_change_units(self): np.testing.assert_almost_equal(tab.data.values[:,1],[1]) np.testing.assert_almost_equal(tab.data.values[:,2],[2]) np.testing.assert_almost_equal(tab.data.values[:,3],[10]) - np.testing.assert_equal(tab.columns, ['Index','om [rpm]', 'F [kN]', 'angle_[deg]']) + np.testing.assert_equal(list(tab.columns), ['Index','om [rpm]', 'F [kN]', 'angle_[deg]']) if __name__ == '__main__': From 30d96ad951cc57806367ec40a61ed53f07ffc337 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 8 May 2026 14:56:46 +0000 Subject: [PATCH 2/3] Revert "fix: wrap tab.columns in list() for assert_equal comparison" This reverts commit ff5540ee7665f72c21f9c38d1e6e133671e4d1b6. --- pydatview/plugins/tests/test_standardizeUnits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydatview/plugins/tests/test_standardizeUnits.py b/pydatview/plugins/tests/test_standardizeUnits.py index 7c44785..bfa9540 100644 --- a/pydatview/plugins/tests/test_standardizeUnits.py +++ b/pydatview/plugins/tests/test_standardizeUnits.py @@ -18,7 +18,7 @@ def test_change_units(self): np.testing.assert_almost_equal(tab.data.values[:,1],[1]) np.testing.assert_almost_equal(tab.data.values[:,2],[2]) np.testing.assert_almost_equal(tab.data.values[:,3],[10]) - np.testing.assert_equal(list(tab.columns), ['Index','om [rpm]', 'F [kN]', 'angle_[deg]']) + np.testing.assert_equal(tab.columns, ['Index','om [rpm]', 'F [kN]', 'angle_[deg]']) if __name__ == '__main__': From f7b5107e35e5bd75a7152901a497a23d750fea6f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 8 May 2026 14:57:16 +0000 Subject: [PATCH 3/3] fix: convert tab.columns to list before assert_equal comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tab.columns returns a numpy array (self.data.columns.values). Newer numpy raises ValueError when assert_equal internally evaluates the truth value of the element-wise comparison result. This is not masking a bug from PR #10 — the column renaming in changeUnits WE flavor works correctly, and the numerical value assertions on lines 18-20 independently verify correctness. https://claude.ai/code/session_01R1Zn4U6BEuWmXXeCPy1mJs --- pydatview/plugins/tests/test_standardizeUnits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydatview/plugins/tests/test_standardizeUnits.py b/pydatview/plugins/tests/test_standardizeUnits.py index bfa9540..7c44785 100644 --- a/pydatview/plugins/tests/test_standardizeUnits.py +++ b/pydatview/plugins/tests/test_standardizeUnits.py @@ -18,7 +18,7 @@ def test_change_units(self): np.testing.assert_almost_equal(tab.data.values[:,1],[1]) np.testing.assert_almost_equal(tab.data.values[:,2],[2]) np.testing.assert_almost_equal(tab.data.values[:,3],[10]) - np.testing.assert_equal(tab.columns, ['Index','om [rpm]', 'F [kN]', 'angle_[deg]']) + np.testing.assert_equal(list(tab.columns), ['Index','om [rpm]', 'F [kN]', 'angle_[deg]']) if __name__ == '__main__':