def test_missing_values(self): with pytest.raises(ValueError): parse_date_missing_zero_padding('3/1')
def test_100_year(self): assert parse_date_missing_zero_padding('3/1/100', min_year=0) == date(100, 3, 1)
def test_invalid_years(self): with pytest.raises(ValueError): parse_date_missing_zero_padding('3/1/100') with pytest.raises(ValueError): parse_date_missing_zero_padding('3/1/-1')
def test_min_year2(self): assert parse_date_missing_zero_padding('3/1/15', min_year=1950) == date(2015, 3, 1)
def test_full_year(self): assert parse_date_missing_zero_padding('3/1/2015') == date(2015, 3, 1)
def test_order(self): assert parse_date_missing_zero_padding('1/15/3', order='dym') == date(2015, 3, 1)
def test_min_year1(self): assert parse_date_missing_zero_padding('3/1/15', min_year=1900) == date(1915, 3, 1)
def test_missing_values(self): with pytest.raises(ValueError): parse_date_missing_zero_padding('3/1')
def test_simple(self): assert parse_date_missing_zero_padding('3/1/15') == date(2015, 3, 1)
def test_100_year(self): assert parse_date_missing_zero_padding('3/1/100', min_year=0) == date(100, 3, 1)
def test_invalid_years(self): with pytest.raises(ValueError): parse_date_missing_zero_padding('3/1/100') with pytest.raises(ValueError): parse_date_missing_zero_padding('3/1/-1')
def test_full_year(self): assert parse_date_missing_zero_padding('3/1/2015') == date(2015, 3, 1)
def test_min_year2(self): assert parse_date_missing_zero_padding('3/1/15', min_year=1950) == date( 2015, 3, 1)
def test_min_year1(self): assert parse_date_missing_zero_padding('3/1/15', min_year=1900) == date( 1915, 3, 1)
def test_order(self): assert parse_date_missing_zero_padding('1/15/3', order='dym') == date( 2015, 3, 1)
def test_simple(self): assert parse_date_missing_zero_padding('3/1/15') == date(2015, 3, 1)