예제 #1
0
def test_parse_failure_2():
    assert not Term.parse("Spring 2010 (View only)")
예제 #2
0
def test_parse_spring():
    term = Term.parse("spring 2012")
    assert term
    assert term.get_season() == Term.SPRING
    assert term.get_year() == 2012
예제 #3
0
def test_parse_failure_2():
    assert not Term.parse("Breakfast 2010")
예제 #4
0
def test_parse_failure_1():
    assert not Term.parse("")
예제 #5
0
def test_parse_fall():
    term = Term.parse("FALL 2039")
    assert term
    assert term.get_season() == Term.FALL
    assert term.get_year() == 2039
예제 #6
0
def test_parse_summer():
    term = Term.parse("Summer1998")
    assert term
    assert term.get_season() == Term.SUMMER
    assert term.get_year() == 1998