def test_date_input(self): self.assertEquals(types.date("2008-08-01"), datetime.datetime(2008, 8, 1))
def test_date_too_early(self): self.assertRaises(ValueError, lambda: types.date("0001-01-01"))
def test_date_input_error(self): self.assertRaises(ValueError, lambda: types.date("2008-13-13"))
def test_date_input(self): assert_equal(types.date("2008-08-01"), datetime(2008, 8, 1))
def test_date_later_than_1900(self): self.assertEquals(types.date("1900-01-01"), datetime.datetime(1900, 1, 1))
def test_date_later_than_1900(self): assert_equal(types.date("1900-01-01"), datetime(1900, 1, 1))
def test_date_input_error(self): with self.assertRaises(ValueError): types.date("2008-13-13")
def test_date_too_early(self): with self.assertRaises(ValueError): types.date("0001-01-01")