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

Class TestOutOfBounds

tests/test_parser.py:737–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected