Решение на Питоните хапят! от Георги Харизанов
Обратно към всички решения
Към профила на Георги Харизанов
Резултати
- 0 точки от тестове
- 0 бонус точки
- 0 точки общо
- 1 успешни тест(а)
- 12 неуспешни тест(а)
Код
Лог от изпълнението
EEEEEEEEEEF.E
======================================================================
ERROR: 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-1jdskud/test.py", line 85, in test_growth
py.move(Python.LEFT)
File "/tmp/d20130606-14014-1jdskud/solution.py", line 107, in move
self.body[1] = PythonPart(world, self.coords)
NameError: global name 'world' is not defined
======================================================================
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-1jdskud/test.py", line 103, in test_move_backwards
py.move(direction)
File "/tmp/d20130606-14014-1jdskud/solution.py", line 107, in move
self.body[1] = PythonPart(world, self.coords)
NameError: global name 'world' is not defined
======================================================================
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-1jdskud/test.py", line 40, in test_ouroboros_death
py.move(Python.LEFT)
File "/tmp/d20130606-14014-1jdskud/solution.py", line 107, in move
self.body[1] = PythonPart(world, self.coords)
NameError: global name 'world' is not defined
======================================================================
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-1jdskud/test.py", line 29, in test_python_movement_basic
py.move(direction)
File "/tmp/d20130606-14014-1jdskud/solution.py", line 107, in move
self.body[1] = PythonPart(world, self.coords)
NameError: global name 'world' is not defined
======================================================================
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-1jdskud/test.py", line 14, in test_python_placement
self.assertIsInstance(world[10][10].contents, PythonHead)
AttributeError: 'Cell' 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-1jdskud/test.py", line 64, in test_snake_death
{py2.move(Python.LEFT) for repeat in range(0, 5)}
File "/tmp/d20130606-14014-1jdskud/test.py", line 64, in <setcomp>
{py2.move(Python.LEFT) for repeat in range(0, 5)}
File "/tmp/d20130606-14014-1jdskud/solution.py", line 107, in move
self.body[1] = PythonPart(world, self.coords)
NameError: global name 'world' is not defined
======================================================================
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-1jdskud/test.py", line 54, in test_wallpunch_death
{py.move(Python.LEFT) for repeat in range(0, 10)}
File "/tmp/d20130606-14014-1jdskud/test.py", line 54, in <setcomp>
{py.move(Python.LEFT) for repeat in range(0, 10)}
File "/tmp/d20130606-14014-1jdskud/solution.py", line 107, in move
self.body[1] = PythonPart(world, self.coords)
NameError: global name 'world' is not defined
======================================================================
ERROR: test_bigbang (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-1jdskud/test.py", line 111, in test_bigbang
self.assertEqual(len(world), 10)
TypeError: object of type 'World' has no len()
======================================================================
ERROR: test_cell (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-1jdskud/test.py", line 139, in test_cell
self.assertEqual(cell.contents.energy, 5)
AttributeError: 'Cell' object has no attribute 'contents'
======================================================================
ERROR: test_cell_empty (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-1jdskud/test.py", line 142, in test_cell_empty
emptycell = Cell()
TypeError: __init__() missing 1 required positional argument: 'content'
======================================================================
ERROR: test_world_manipulation (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-1jdskud/test.py", line 134, in test_world_manipulation
self.assertEqual(world[row][col].contents.energy, 5)
AttributeError: 'Cell' object has no attribute 'contents'
======================================================================
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-1jdskud/test.py", line 147, in test_cell_invalid
badcell = Cell("snakesandladders")
AssertionError: TypeError not raised
----------------------------------------------------------------------
Ran 13 tests in 0.021s
FAILED (failures=1, errors=11)
История (2 версии и 0 коментара)
Георги обнови решението на 15.05.2013 16:56 (преди над 11 години)
Георги обнови решението на 15.05.2013 16:57 (преди над 11 години)