From ce3b6703c153ba5c827996bfa8fd9bfa85fe2adb Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 8 Oct 2015 16:02:17 +0200 Subject: Remove unneeded id field from {en,sl}.py files --- python/problems/functions/greatest/en.py | 1 - python/problems/functions/greatest/sl.py | 1 - 2 files changed, 2 deletions(-) (limited to 'python/problems/functions/greatest') diff --git a/python/problems/functions/greatest/en.py b/python/problems/functions/greatest/en.py index 8a0c883..acf4672 100644 --- a/python/problems/functions/greatest/en.py +++ b/python/problems/functions/greatest/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 195 name = 'Maximum number' slug = 'Maximum number' diff --git a/python/problems/functions/greatest/sl.py b/python/problems/functions/greatest/sl.py index a7916a5..12e07fe 100644 --- a/python/problems/functions/greatest/sl.py +++ b/python/problems/functions/greatest/sl.py @@ -3,7 +3,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 195 name = 'Največji' slug = 'Največji' -- cgit v1.2.1 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/common.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/problems/functions/greatest') diff --git a/python/problems/functions/greatest/common.py b/python/problems/functions/greatest/common.py index 6857603..e6b7139 100644 --- a/python/problems/functions/greatest/common.py +++ b/python/problems/functions/greatest/common.py @@ -32,6 +32,10 @@ hint_type = { } def test(python, code): + tokens = get_tokens(code) + if not has_token_sequence(tokens, ['def', 'max_val']): + return False, [{'id' : 'no_func_name', 'args' : {'func_name' : 'max_val'}}] + test_lists = [[6, 4, 2, 0], [4, 6, 2, 0], [4, 2, 6, 0], -- cgit v1.2.1 From 6e281624b9a0ae29f1f1862f9d581b219ba3b95a Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 12 Oct 2015 11:46:08 +0200 Subject: Remove group attribute from problem common.py files --- python/problems/functions/greatest/common.py | 1 - 1 file changed, 1 deletion(-) (limited to 'python/problems/functions/greatest') diff --git a/python/problems/functions/greatest/common.py b/python/problems/functions/greatest/common.py index e6b7139..726fa88 100644 --- a/python/problems/functions/greatest/common.py +++ b/python/problems/functions/greatest/common.py @@ -6,7 +6,6 @@ from python.util import has_token_sequence, string_almost_equal, \ from server.hints import Hint id = 195 -group = 'functions' number = 1 visible = True -- cgit v1.2.1