Skip to content

Commit

Permalink
test: Test multiple runs thorugh as_utc()
Browse files Browse the repository at this point in the history
  • Loading branch information
shakefu committed Feb 7, 2018
1 parent f2bd516 commit d17561a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ def test_as_utc():
eq_(d, pytool.time.as_utc(d))


def test_as_utc_multi():
t = pytool.time.utcnow()
d = pytool.time.as_utc(t)
eq_(d, pytool.time.as_utc(t))
d = pytool.time.as_utc(d)
eq_(d, pytool.time.as_utc(t))
d = pytool.time.as_utc(d)
eq_(d, pytool.time.as_utc(t))


def test_as_utc_naive():
d = datetime.now()
d2 = d + timedelta(seconds=time.altzone if pytool.time.is_dst(d)
Expand Down

0 comments on commit d17561a

Please sign in to comment.