summaryrefslogtreecommitdiff
path: root/python/problems/functions/greatest_negative
diff options
context:
space:
mode:
Diffstat (limited to 'python/problems/functions/greatest_negative')
-rw-r--r--python/problems/functions/greatest_negative/common.py4
1 files changed, 4 insertions, 0 deletions
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],