Решение на Тесте карти от Иван Котов
Обратно към всички решения
Към профила на Иван Котов
Резултати
- 2 точки от тестове
- 0 бонус точки
- 2 точки общо
- 3 успешни тест(а)
- 13 неуспешни тест(а)
Код
Лог от изпълнението
EEEEEEEEF.EF.FE.
======================================================================
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-crsqqs/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-crsqqs/test.py", line 117, in test_deck_add
deck = solution.CardCollection()
AttributeError: 'module' object has no attribute 'CardCollection'
======================================================================
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-crsqqs/test.py", line 138, in test_deck_draw
deck = solution.CardCollection(self.deck)
AttributeError: 'module' object has no attribute 'CardCollection'
======================================================================
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-crsqqs/test.py", line 154, in test_deck_index
deck = solution.CardCollection()
AttributeError: 'module' object has no attribute 'CardCollection'
======================================================================
ERROR: test_deck_iteration (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-crsqqs/test.py", line 165, in test_deck_iteration
deck = solution.CardCollection(self.deck)
AttributeError: 'module' object has no attribute 'CardCollection'
======================================================================
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-crsqqs/test.py", line 129, in test_deck_order
deck = solution.CardCollection()
AttributeError: 'module' object has no attribute 'CardCollection'
======================================================================
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-crsqqs/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-crsqqs/test.py", line 170, in test_standard_deck
cards = [str(card) for card in solution.StandardDeck()]
AttributeError: 'module' object has no attribute 'StandardDeck'
======================================================================
ERROR: test_all_suits_ranks_equal (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-crsqqs/test.py", line 92, in test_all_suits_ranks_equal
self.assertEqual(card.rank, rank())
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-crsqqs/solution.py", line 8, in __eq__
if self.symbol == other.symbol:
AttributeError: type object 'Seven' has no attribute 'symbol'
======================================================================
ERROR: test_suit_rank_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-crsqqs/test.py", line 85, in test_suit_rank_equals
self.assertEqual(aos.rank, solution.RANKS["Ace"]())
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-crsqqs/solution.py", line 8, in __eq__
if self.symbol == other.symbol:
AttributeError: type object 'Ace' has no attribute 'symbol'
======================================================================
FAIL: test_all_card_instances (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-crsqqs/test.py", line 67, in test_all_card_instances
self.assertIsInstance(card.rank, rank)
AssertionError: <class 'solution.Seven'> is not an instance of <class 'solution.Seven'>
======================================================================
FAIL: test_all_to_string (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-crsqqs/test.py", line 104, in test_all_to_string
+ " of " + str(card.suit))
AssertionError: 'Seven of Spades' != "<class 'solution.Seven'> of <class 'solution.Spades'>"
- Seven of Spades
+ <class 'solution.Seven'> of <class 'solution.Spades'>
======================================================================
FAIL: test_card_instance (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-crsqqs/test.py", line 60, in test_card_instance
self.assertIsInstance(aos.rank, solution.RANKS["Ace"])
AssertionError: <class 'solution.Ace'> is not an instance of <class 'solution.Ace'>
----------------------------------------------------------------------
Ran 16 tests in 0.017s
FAILED (failures=3, errors=10)
История (1 версия и 0 коментара)
Иван обнови решението на 26.03.2014 15:50 (преди над 10 години)