Skip to content

Commit

Permalink
CSVImport tests: allow different time resolution (on pandas 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Oct 4, 2024
1 parent 0ff8935 commit f7fe7eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Orange/widgets/data/tests/test_owcsvimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f7fe7eb

Please sign in to comment.