From 95e107bf9e6a288969e4a83aee1a7062990f3b67 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 9 Oct 2015 16:35:23 +0200 Subject: Fixed testing for most problems. --- python/problems/functions/greatest_negative/common.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/problems/functions/greatest_negative') diff --git a/python/problems/functions/greatest_negative/common.py b/python/problems/functions/greatest_negative/common.py index 5d65438..7ab3aca 100644 --- a/python/problems/functions/greatest_negative/common.py +++ b/python/problems/functions/greatest_negative/common.py @@ -35,6 +35,10 @@ hint_type = { def test(python, code): + tokens = get_tokens(code) + if not has_token_sequence(tokens, ['def', 'max_neg']): + return False, [{'id' : 'no_func_name', 'args' : {'func_name' : 'max_neg'}}] + test_lists = [[6, 4, 2, 0], [4, 6, 2, -1], [4, -2, -6, 0], -- cgit v1.2.1