Skip to content

Commit

Permalink
test_schedule.py: fix UTC string expected result for python 2 vs 3
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Arnold <nerdboy@gentoo.org>
  • Loading branch information
sarnold committed Nov 14, 2019
1 parent f9916d4 commit 9ca1d37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ def test_utc_is_normal(self):
self.assertIsInstance(fo, datetime.tzinfo)
dt = datetime.datetime.now(utc)
self.assertEqual(fo.utcoffset(dt), datetime.timedelta(0))
self.assertEqual(fo.tzname(dt), "UTC")
if sys.version_info > (3, 0, 0):
utc_arg = "UTC+00:00"
else:
utc_arg = "UTC"
self.assertEqual(fo.tzname(dt), utc_arg)

def test_utc_dst_is_dt(self):
fo = utc
Expand Down

0 comments on commit 9ca1d37

Please sign in to comment.