Решение на Тесте карти от Ивайло Бъчваров
Обратно към всички решения
Към профила на Ивайло Бъчваров
Резултати
- 8 точки от тестове
- 0 бонус точки
- 8 точки общо
- 12 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
F..F
Stdout:
2
.FF.........
======================================================================
FAIL: 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-1aqckup/test.py", line 175, in test_belote_deck
self.assertEqual(BELOTE_DECK, cards)
AssertionError: Lists differ: ['King of Diamonds', 'Queen of... != ['King of Diamonds', 'Queen of...
First differing element 7:
Ace of Diamonds
King of Clubs
First list contains 4 additional elements.
First extra element 28:
Nine of Spades
Diff is 752 characters long. Set self.maxDiff to None to see it.
======================================================================
FAIL: 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-1aqckup/test.py", line 160, in test_deck_index
self.assertEqual(0, deck.index(card1))
AssertionError: 0 != None
Stdout:
2
======================================================================
FAIL: 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-1aqckup/test.py", line 134, in test_deck_order
self.assertEqual(deck.bottom_card(), card1)
AssertionError: Card Two of Spades != Card King of Clubs
======================================================================
FAIL: 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-1aqckup/test.py", line 179, in test_sixtysix_deck
self.assertEqual(SIXTY_SIX_DECK, cards)
AssertionError: Lists differ: ['King of Diamonds', 'Queen of... != ['King of Diamonds', 'Queen of...
First differing element 5:
Ace of Diamonds
King of Clubs
First list contains 4 additional elements.
First extra element 20:
Jack of Spades
['King of Diamonds',
'Queen of Diamonds',
'Jack of Diamonds',
'Ten of Diamonds',
'Nine of Diamonds',
- 'Ace of Diamonds',
'King of Clubs',
'Queen of Clubs',
'Jack of Clubs',
'Ten of Clubs',
'Nine of Clubs',
- 'Ace of Clubs',
'King of Hearts',
'Queen of Hearts',
'Jack of Hearts',
'Ten of Hearts',
'Nine of Hearts',
- 'Ace of Hearts',
'King of Spades',
'Queen of Spades',
'Jack of Spades',
'Ten of Spades',
- 'Nine of Spades',
? ^
+ 'Nine of Spades']
? ^
- 'Ace of Spades']
----------------------------------------------------------------------
Ran 16 tests in 0.041s
FAILED (failures=4)
История (4 версии и 5 коментара)
Ивайло обнови решението на 24.03.2014 02:04 (преди над 10 години)
Ивайло обнови решението на 24.03.2014 13:59 (преди над 10 години)
Ивайло обнови решението на 24.03.2014 17:50 (преди над 10 години)
Ивайло обнови решението на 24.03.2014 19:21 (преди над 10 години)