From f7fe7ebbe53ae1a42dd62807d09057cafbb027e9 Mon Sep 17 00:00:00 2001 From: janezd Date: Fri, 4 Oct 2024 10:34:21 +0200 Subject: [PATCH] CSVImport tests: allow different time resolution (on pandas 3) --- Orange/widgets/data/tests/test_owcsvimport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Orange/widgets/data/tests/test_owcsvimport.py b/Orange/widgets/data/tests/test_owcsvimport.py index 3a4734f6a15..9cd7999cc04 100644 --- a/Orange/widgets/data/tests/test_owcsvimport.py +++ b/Orange/widgets/data/tests/test_owcsvimport.py @@ -510,9 +510,10 @@ def test_load_csv(self): ) df = owcsvimport.load_csv(io.BytesIO(contents), opts) self.assertEqual(df.shape, (3, 5)) + resolution = "ns" if pd.__version__ < "3.0" else "s" self.assertSequenceEqual( list(df.dtypes), - [np.dtype("M8[ns]"), np.dtype(float), np.dtype(object), + [np.dtype(f"M8[{resolution}]"), np.dtype(float), np.dtype(object), "category", np.dtype(float)], ) opts = owcsvimport.Options(