MCPcopy Create free account
hub / github.com/dateutil/dateutil / TestOutOfBounds

Class TestOutOfBounds

tests/test_parser.py:740–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738
739
740class TestOutOfBounds:
741
742 def test_no_year_zero(self):
743 with pytest.raises(ParserError):
744 parse("0000 Jun 20")
745
746 def test_out_of_bound_day(self):
747 with pytest.raises(ParserError):
748 parse("Feb 30, 2007")
749
750 def test_illegal_month_error(self):
751 with pytest.raises(ParserError):
752 parse("0-100")
753
754 def test_day_sanity(self, fuzzy):
755 dstr = "2014-15-25"
756 with pytest.raises(ParserError):
757 parse(dstr, fuzzy=fuzzy)
758
759 def test_minute_sanity(self, fuzzy):
760 dstr = "2014-02-28 22:64"
761 with pytest.raises(ParserError):
762 parse(dstr, fuzzy=fuzzy)
763
764 def test_hour_sanity(self, fuzzy):
765 dstr = "2014-02-28 25:16 PM"
766 with pytest.raises(ParserError):
767 parse(dstr, fuzzy=fuzzy)
768
769 def test_second_sanity(self, fuzzy):
770 dstr = "2014-02-28 22:14:64"
771 with pytest.raises(ParserError):
772 parse(dstr, fuzzy=fuzzy)
773
774
775class TestParseUnimplementedCases:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected