auto_grader.py 371 Bytes
Newer Older
Sanjay Krishnan committed
1 2 3 4 5 6 7 8
from countD import *
from core import *
from ooc import *
import json

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

Sanjay Krishnan committed
9
for l in range(80, 140, 10):
Sanjay Krishnan committed
10 11
    m = MemoryLimitedHashMap(limit = l)
    actual = {k:v for k,v in Count(imdb_years(), m)}
Sanjay Krishnan committed
12 13 14 15 16

    try:
    	assert(expected == actual)
    except:
    	print("[#1] Failed for Memory Limit", l)
Sanjay Krishnan committed
17 18