コード例 #1
0
ファイル: tests.py プロジェクト: cis192s13/hw
def test_load_csv():
    """Check that correct number of courses were loaded from the full CSV"""
    # Note this only checks the correct number of courses were loaded!
    courses = load_csv("courses.csv")
    eq_(len(courses), 5769)
コード例 #2
0
ファイル: tests.py プロジェクト: cis192s13/hw
def test_write_load():
    """Check that the write and load don't change the courses"""
    courses = load_csv("courses.csv")
    write_json("courses.json", courses)
    loaded_courses = load_json("courses.json")
    eq_(courses, loaded_courses)
コード例 #3
0
ファイル: tests.py プロジェクト: cis192s13/hw
def test_load_csv_small():
    """Check the 3 courses were loaded correctly"""
    courses = load_csv("courses_small.csv")
    eq_(courses, COURSES_SMALL)