summaryrefslogtreecommitdiff
path: root/python/problems/functions/greatest_negative
diff options
context:
space:
mode:
authorMartin <martin@leo.fri1.uni-lj.si>2015-10-09 16:35:23 +0200
committerMartin <martin@leo.fri1.uni-lj.si>2015-10-09 16:35:23 +0200
commit95e107bf9e6a288969e4a83aee1a7062990f3b67 (patch)
treef69b15164a30d464f6f7b340634095716344b1ec /python/problems/functions/greatest_negative
parentfd31d7d74e58796f3a5a7c84b4b19cb4af59ef4c (diff)
Fixed testing for most problems.
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],