Решение на Четири функции от Мария Терзиева
Обратно към всички решения
Към профила на Мария Терзиева
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 16 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
..E........FFF......
======================================================================
ERROR: test_cache_function_with_vargs (test.SecondHomeworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20130408-29081-yx0f0m/test.py", line 160, in test_cache_function_with_vargs
self.assertEqual(6, cached_sum(1, 2, 3))
TypeError: <lambda>() takes 1 positional argument but 3 were given
======================================================================
FAIL: test_iterate_out_of_order_calls (test.SecondHomeworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20130408-29081-yx0f0m/test.py", line 53, in test_iterate_out_of_order_calls
self.assertEqual(1 * 'eggs', f0('eggs'))
AssertionError: 'eggs' != 'eggseggseggseggseggseggseggseggs'
- eggs
+ eggseggseggseggseggseggseggseggs
======================================================================
FAIL: test_iterate_out_of_order_calls_again (test.SecondHomeworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20130408-29081-yx0f0m/test.py", line 53, in test_iterate_out_of_order_calls
self.assertEqual(1 * 'eggs', f0('eggs'))
AssertionError: 'eggs' != 'eggseggseggseggseggseggseggseggs'
- eggs
+ eggseggseggseggseggseggseggseggs
======================================================================
FAIL: test_iterate_out_of_order_calls_yet_again (test.SecondHomeworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20130408-29081-yx0f0m/test.py", line 53, in test_iterate_out_of_order_calls
self.assertEqual(1 * 'eggs', f0('eggs'))
AssertionError: 'eggs' != 'eggseggseggseggseggseggseggseggs'
- eggs
+ eggseggseggseggseggseggseggseggs
----------------------------------------------------------------------
Ran 20 tests in 0.012s
FAILED (failures=3, errors=1)
История (1 версия и 0 коментара)
Мария обнови решението на 15.03.2013 23:13 (преди над 11 години)