auto_grader.py 320 Bytes
Newer Older
Sanjay Krishnan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
from countD import *
from core import *
from ooc import *
import json

test_file = open('years.json','r')
expected = json.loads(test_file.read())

for l in range(80, 140, 20):
    m = MemoryLimitedHashMap(limit = l)
    actual = {k:v for k,v in Count(imdb_years(), m)}
    print("Memory Limit", l, expected == actual)