Skip to content

Commit

Permalink
py3 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Apr 13, 2012
1 parent a2a83a2 commit cd4ec6b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/croniter/tests/test_croniter.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ def test_bug34(self):
itr = croniter('* * 31 2 *', base)
try:
itr.get_next(datetime)
except CroniterBadDateError, ex:
self.assertEqual(ex.message,
except (CroniterBadDateError,) as ex:
self.assertEqual("{0}".format(ex),
'failed to find next date')

def testBug57(self):
Expand Down Expand Up @@ -512,7 +512,8 @@ def assertScheduleTimezone(self, callback, expected_schedule):
for expected_date, expected_offset in expected_schedule:
d = callback()
self.assertEqual(expected_date, d.replace(tzinfo=None))
self.assertEqual(expected_offset, croniter._timedelta_to_seconds(d.utcoffset()))
self.assertEqual(expected_offset,
croniter._timedelta_to_seconds(d.utcoffset()))

def testTimezoneWinterTime(self):
tz = pytz.timezone('Europe/Athens')
Expand Down

0 comments on commit cd4ec6b

Please sign in to comment.