Skip to content

Commit

Permalink
Added unit test for invalid quarter check for daterange.from_quarter
Browse files Browse the repository at this point in the history
  • Loading branch information
runfalk committed May 9, 2017
1 parent 265970a commit 0e9d837
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_daterange.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ def test_from_quarter(year, quarter, first_day):
first_day, period="quarter")


@pytest.mark.parametrize("quarter", [0, 5])
def test_from_quarter_value_check(quarter):
with pytest.raises(ValueError):
assert daterange.from_quarter(2000, quarter)


@pytest.mark.parametrize("year", [
2000,
2001,
Expand Down

0 comments on commit 0e9d837

Please sign in to comment.