def test_line_count_long():
    result = grader.grade(input_data, quality, '0\n 10\n 123\n')
    assert(result['score'] == 0.3)
def test_positivity_violated():
    result = grader.grade(input_data, quality, '-1\n123\n')
    assert(result['score'] == 0.0)
    assert('positive' in result['feedback'])
def test_number_line_short():
    result = grader.grade(input_data, quality, ' \n123\n')
    assert(result['score'] == 0.0)
def test_partial_credit():
    result = grader.grade(input_data, quality, greedy_submission)
    assert(result['score'] == 0.7)
def test_feasible_credit():
    result = grader.grade(input_data, quality, '5\n123\n')
    assert(result['score'] == 0.3)
def test_alpha_time():
    result = grader.grade(input_data, quality, '10\n123d\n')
    assert(result['score'] == 0.0)
def test_partial_credit():
    result = grader.grade(input_data, quality, greedy_submission)
    assert (result['score'] == 0.7)
def test_alpha_number():
    result = grader.grade(input_data, quality, 'a\n123\n')
    assert (result['score'] == 0.0)
def test_alpha_time():
    result = grader.grade(input_data, quality, '10\n123d\n')
    assert (result['score'] == 0.0)
def test_line_count_long():
    result = grader.grade(input_data, quality, '0\n 10\n 123\n')
    assert (result['score'] == 0.3)
def test_line_count_short():
    result = grader.grade(input_data, quality, '123\n')
    assert (result['score'] == 0.0)
def test_number_line_short():
    result = grader.grade(input_data, quality, ' \n123\n')
    assert (result['score'] == 0.0)
def test_positivity_violated():
    result = grader.grade(input_data, quality, '-1\n123\n')
    assert (result['score'] == 0.0)
    assert ('positive' in result['feedback'])
def test_feasible_credit():
    result = grader.grade(input_data, quality, '5\n123\n')
    assert (result['score'] == 0.3)
def test_line_count_short():
    result = grader.grade(input_data, quality, '123\n')
    assert(result['score'] == 0.0)
def test_float_number():
    result = grader.grade(input_data, quality, '8.7\n123\n')
    assert (result['score'] == 0.0)
def test_alpha_number():
    result = grader.grade(input_data, quality, 'a\n123\n')
    assert(result['score'] == 0.0)
def test_full_credit():
    result = grader.grade(input_data, quality, opt_submission)
    assert(result['score'] == 1.0)
def test_float_number():
    result = grader.grade(input_data, quality, '8.7\n123\n')
    assert(result['score'] == 0.0)
def test_full_credit():
    result = grader.grade(input_data, quality, opt_submission)
    assert (result['score'] == 1.0)