Решение на Питоните хапят! от Иван Латунов
Обратно към всички решения
Към профила на Иван Латунов
Резултати
- 2 точки от тестове
- 0 бонус точки
- 2 точки общо
- 5 успешни тест(а)
- 8 неуспешни тест(а)
Код
Лог от изпълнението
FEEEEEE...F..
======================================================================
ERROR: test_move_backwards (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 98, in test_move_backwards
py = Python(world, Vec2D(10, 10), 3, Python.LEFT)
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 183, in __init__
self.__plot__()
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 173, in __plot__
self.world[y][x] = PythonPart()
IndexError: list assignment index out of range
======================================================================
ERROR: test_ouroboros_death (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 39, in test_ouroboros_death
py = Python(world, Vec2D(10, 10), 5, Python.LEFT)
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 183, in __init__
self.__plot__()
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 173, in __plot__
self.world[y][x] = PythonPart()
IndexError: list assignment index out of range
======================================================================
ERROR: test_python_movement_basic (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 27, in test_python_movement_basic
py = Python(world, Vec2D(10, 10), py_size, direction)
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 183, in __init__
self.__plot__()
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 173, in __plot__
self.world[y][x] = PythonPart()
IndexError: list assignment index out of range
======================================================================
ERROR: test_python_placement (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 14, in test_python_placement
self.assertIsInstance(world[10][10].contents, PythonHead)
AttributeError: 'PythonHead' object has no attribute 'contents'
======================================================================
ERROR: test_snake_death (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 58, in test_snake_death
py1 = Python(world, Vec2D(5, 5), 3, Python.UP)
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 183, in __init__
self.__plot__()
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 173, in __plot__
self.world[y][x] = PythonPart()
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 131, in __getitem__
raise IndexError
IndexError
======================================================================
ERROR: test_wallpunch_death (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 51, in test_wallpunch_death
py = Python(world, Vec2D(5, 5), 3, Python.LEFT)
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 183, in __init__
self.__plot__()
File "/tmp/d20130606-14014-c6rc3c/solution.py", line 173, in __plot__
self.world[y][x] = PythonPart()
IndexError: list assignment index out of range
======================================================================
FAIL: test_growth (test.PythonTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 92, in test_growth
self.assertTrue(cartesian_coord or screen_coord)
AssertionError: False is not true
======================================================================
FAIL: test_cell_invalid (test.WorldTest)
----------------------------------------------------------------------
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/d20130606-14014-c6rc3c/test.py", line 147, in test_cell_invalid
badcell = Cell("snakesandladders")
AssertionError: TypeError not raised
----------------------------------------------------------------------
Ran 13 tests in 0.068s
FAILED (failures=2, errors=6)
История (3 версии и 0 коментара)
Иван обнови решението на 15.05.2013 13:30 (преди над 11 години)
Иван обнови решението на 15.05.2013 16:59 (преди над 11 години)
Иван обнови решението на 15.05.2013 16:59 (преди над 11 години)