summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMartin Možina <martin.mozina@fri.uni-lj.si>2017-03-23 15:04:27 +0100
committerMartin Možina <martin.mozina@fri.uni-lj.si>2017-03-23 15:04:27 +0100
commit4ba7d1787417d0e1dd8ce48baf04ab5b28379c19 (patch)
treecaf8b97db87e15865901db584cc8899580d620e4 /python
parent0bb8a8dd88e7ba782af77be699d2c9df84e81241 (diff)
Fixed tests in palindromic_numbers.
Diffstat (limited to 'python')
-rw-r--r--python/problems/functions/palindromic_numbers/common.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/python/problems/functions/palindromic_numbers/common.py b/python/problems/functions/palindromic_numbers/common.py
index 494e2d0..6ebf93f 100644
--- a/python/problems/functions/palindromic_numbers/common.py
+++ b/python/problems/functions/palindromic_numbers/common.py
@@ -8,7 +8,7 @@ number = 8
visible = True
solution = '''\
-def palindromic_numbers():
+def palindromic_number():
xs = []
for i in range(100, 1000):
for j in range(100, 1000):
@@ -22,23 +22,13 @@ hint_type = {
}
def test(python, code, aux_code=''):
- func_name = 'numbers'
+ func_name = 'palindromic_number'
tokens = get_tokens(code)
if not has_token_sequence(tokens, ['def', func_name]):
return False, [{'id' : 'no_func_name', 'args' : {'func_name' : func_name}}]
- in_out = [
- (906609, True),
- (123456, False),
- (1, True),
- (11, True),
- (12, False),
- (113, False),
- (131, True)
- ]
-
- test_in = [(func_name+'(%s)'%str(l[0]), None) for l in in_out]
- test_out = [l[1] for l in in_out]
+ test_in = [(func_name+'()', None)]
+ test_out = [906609]
answers = python(code=aux_code+code, inputs=test_in, timeout=1.0)
n_correct = 0