Skip to content

Commit

Permalink
version conflict in test_resample.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shi-yu-wang committed Jun 12, 2024
1 parent de1ca5c commit ab61f3c
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions tests/transform/test_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,21 @@ def test_two_month(self):
logger.info("Testing end-of-month resampling...")
self._test_granularity(granularity="2ME")
logger.info("Testing end-of-month resampling...")
try:
if sys.version_info[1] < 8:
self._test_granularity(granularity="2M", offset=-pd.Timedelta(days=7, hours=7))
except:
print("An exception occurred. Might due to version issue")
try:

if sys.version_info[1] >= 8:
self._test_granularity(granularity="2ME", offset=-pd.Timedelta(days=7, hours=7))
except:
print("An exception occurred. Might due to version issue")

def test_yearly(self):
logger.info("Testing start-of-year resampling...")
self._test_granularity(granularity="12MS", offset=pd.to_timedelta(0))
logger.info("Testing end-of-year resampling...")
try:
if sys.version_info[1] < 8:
self._test_granularity(granularity="12M", offset=pd.to_timedelta(0))
except:
print("An exception occurred. Might due to version issue")

try:

if sys.version_info[1] >= 8:
self._test_granularity(granularity="12ME", offset=pd.to_timedelta(0))
except:
print("An exception occurred. Might due to version issue")


class TestShingle(unittest.TestCase):
Expand Down

0 comments on commit ab61f3c

Please sign in to comment.