Error while running evaluate_test_cases


TypeError Traceback (most recent call last)
----> 1 binary_search_results = evaluate_test_cases(count_rotations_binary, test)

/opt/conda/lib/python3.8/site-packages/jovian/pythondsa/ in evaluate_test_cases(function, test_cases, error_only)
69 if not error_only:
70 print("\n\033[1mTEST CASE #{}\033[0m".format(i))
—> 71 result = evaluate_test_case(function, test_case, display=False)
72 results.append(result)
73 if error_only and not result[1]:

/opt/conda/lib/python3.8/site-packages/jovian/pythondsa/ in evaluate_test_case(function, test_case, display)
43 def evaluate_test_case(function, test_case, display=True):
44 “”“Check if function works as expected for test_case“””
—> 45 inputs = test_case[‘input’]
46 output = test_case[‘output’]

TypeError: string indices must be integers

how can I solve this error shown while running --binary_search_results = evaluate_test_cases(count_rotations_binary, test) ?

maybe i can help if you share a screenshot of the error.

1 Like

tests not test

Just an incorrect argument.


Thankss guys.I got the error solved.I just wanted to change the argument from ‘test’ to ‘tests’ only.Thanks for your help.