Skip to content

Commit

Permalink
Added unit test for PeriodRange.offset when offset is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
runfalk committed May 11, 2017
1 parent ccca938 commit f13148f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_periodrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,8 @@ def test_prev_next_period(a, b):
def test_offset(a, offset, b):
assert a.offset(offset) == b
assert a == b.offset(-offset)


def test_zero_offset():
period = PeriodRange.from_week(2000, 1)
assert period.offset(0) is period

0 comments on commit f13148f

Please sign in to comment.