Skip to content

Commit

Permalink
Merge pull request #6442 from PrimozGodec/fix-pandas
Browse files Browse the repository at this point in the history
Test on Pandas 2
  • Loading branch information
janezd committed Jun 16, 2023
2 parents b457638 + 2134bff commit 9e36b55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Orange/data/tests/test_pandas.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pylint: disable=import-outside-toplevel
import unittest
from datetime import date, datetime, timezone, timedelta
from unittest import skipIf

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -199,6 +200,11 @@ def test_table_from_frame_date(self):
self.assertEqual(table.domain.variables[0].have_time, 0)
self.assertEqual(table.domain.variables[0].have_date, 1)

@skipIf(
datetime.today() < datetime(2023, 8, 1),
"Temporarily skipping because of pandas issue",
)
# https://github.com/pandas-dev/pandas/issues/53134#issuecomment-1546011517
def test_table_from_frame_time(self):
df = pd.DataFrame(
[[pd.Timestamp("00:00:00.25")], [pd.Timestamp("20:20:20.30")], [np.nan]]
Expand Down Expand Up @@ -412,6 +418,11 @@ def testa_table_from_frame_string(self):
)
self.assertTrue(all(isinstance(v, StringVariable) for v in table.domain.metas))

@skipIf(
datetime.today() < datetime(2023, 8, 1),
"Temporarily skipping because of pandas issue",
)
# https://github.com/pandas-dev/pandas/issues/53134#issuecomment-1546011517
def test_time_variable_compatible(self):
def to_df(val):
return pd.DataFrame([[pd.Timestamp(val)]])
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ deps =
-r {toxinidir}/requirements-opt.txt
coverage
psycopg2-binary
# we should unpin this someday, but must fix backward incompatibilities first
pandas<2
# no wheels for mac
pymssql<3.0;platform_system!='Darwin' and python_version<'3.8'
latest: https://github.com/pyqtgraph/pyqtgraph/archive/refs/heads/master.zip#egg=pyqtgraph
Expand Down

0 comments on commit 9e36b55

Please sign in to comment.