Решение на Тесте карти от Любослав Павлов
Обратно към всички решения
Към профила на Любослав Павлов
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 8 успешни тест(а)
- 8 неуспешни тест(а)
Код
Лог от изпълнението
EEEE.EEE....F...
======================================================================
ERROR: test_belote_deck (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 174, in test_belote_deck
cards = [str(card) for card in solution.BeloteDeck()]
AttributeError: 'module' object has no attribute 'BeloteDeck'
======================================================================
ERROR: test_deck_add (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 117, in test_deck_add
deck = solution.CardCollection()
TypeError: __init__() missing 1 required positional argument: 'collection'
======================================================================
ERROR: test_deck_draw (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 141, in test_deck_draw
self.assertEqual(card, deck.draw_from_top())
File "/opt/python3.3/lib/python3.3/unittest/case.py", line 642, in assertEqual
assertion_func(first, second, msg=msg)
File "/opt/python3.3/lib/python3.3/unittest/case.py", line 632, in _baseAssertEqual
if not first == second:
File "/tmp/d20140407-19315-3zstl1/solution.py", line 49, in __eq__
return self.rank == other.rank and self.suit == other.suit
AttributeError: 'NoneType' object has no attribute 'rank'
======================================================================
ERROR: test_deck_index (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 154, in test_deck_index
deck = solution.CardCollection()
TypeError: __init__() missing 1 required positional argument: 'collection'
======================================================================
ERROR: test_deck_order (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 129, in test_deck_order
deck = solution.CardCollection()
TypeError: __init__() missing 1 required positional argument: 'collection'
======================================================================
ERROR: test_sixtysix_deck (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 178, in test_sixtysix_deck
cards = [str(card) for card in solution.SixtySixDeck()]
AttributeError: 'module' object has no attribute 'SixtySixDeck'
======================================================================
ERROR: test_standard_deck (test.CardCollectionTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 170, in test_standard_deck
cards = [str(card) for card in solution.StandardDeck()]
AttributeError: 'module' object has no attribute 'StandardDeck'
======================================================================
FAIL: test_card_equals (test.CardTest)
----------------------------------------------------------------------
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/d20140407-19315-3zstl1/test.py", line 74, in test_card_equals
self.assertNotEqual(aos1, solution.Card(solution.RANKS["Ace"], solution.SUITS["Hearts"]))
AssertionError: <solution.Card object at 0xb77d4ccc> == <solution.Card object at 0xb77d4e6c>
----------------------------------------------------------------------
Ran 16 tests in 0.021s
FAILED (failures=1, errors=7)
История (2 версии и 1 коментар)
Любослав обнови решението на 26.03.2014 13:30 (преди над 10 години)
Любослав обнови решението на 26.03.2014 16:53 (преди над 10 години)