def test_years_ago_wrong_input(): with pytest.raises(ValueError): # Sept != valid %b value 'Sep' assert years_ago('6 Sept, 2014') == 4
def test_years_ago(): assert years_ago('8 Aug, 2015') == 3 assert years_ago('6 Sep, 2014') == 4 assert years_ago('1 Oct, 2010') == 8 assert years_ago('31 Dec, 1958') == 60
def test_years_ago(): assert years_ago("8 Aug, 2015") == 3 assert years_ago("6 Sep, 2014") == 4 assert years_ago("1 Oct, 2010") == 8 assert years_ago("31 Dec, 1958") == 60