Решение на От ливадите до Лас Вегас (и назад) от Дейвид Каменов
Обратно към всички решения
Към профила на Дейвид Каменов
Резултати
- 3 точки от тестове
- 1 бонус точка
- 4 точки общо
- 5 успешни тест(а)
- 10 неуспешни тест(а)
Код
Лог от изпълнението
FEF
Stdout:
Inputted invalid face!
..FF.EEE..FE
======================================================================
ERROR: test_correct_direction_and_players_deal (test.TestBelot)
Test dealing with correct direction and players.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
IndexError: list index out of range
======================================================================
ERROR: test_collecting_cards_before_dealing (test.TestGame)
Test collecting the cards before a new deal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
IndexError: list index out of range
======================================================================
ERROR: test_dealing_ltr (test.TestGame)
Test dealing the cards left to right.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
IndexError: list index out of range
======================================================================
ERROR: test_dealing_rtl (test.TestGame)
Test dealing the cards right to left.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AttributeError: 'Game' object has no attribute 'dealing_direction'
======================================================================
ERROR: test_correct_direction_and_players_deal (test.TestPoker)
Test dealing with correct direction and players.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AttributeError: 'Poker' object has no attribute 'dealing_direction'
======================================================================
FAIL: test_correct_deck_init (test.TestBelot)
Test initialization with correct deck.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Items in the first set but not the second:
('diamonds', '10')
('spades', '10')
('hearts', '10')
('clubs', '10')
Items in the second set but not the first:
('hearts', None)
('clubs', None)
('diamonds', None)
('spades', None)
======================================================================
FAIL: test_get_face (test.TestCard)
Test the get_face method.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: None != '10'
Stdout:
Inputted invalid face!
======================================================================
FAIL: test_init_filtered (test.TestDeck)
Test initialized cards with filter.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Items in the first set but not the second:
('diamonds', '10')
('spades', '10')
('hearts', '10')
('clubs', '10')
Items in the second set but not the first:
('hearts', None)
('clubs', None)
('diamonds', None)
('spades', None)
======================================================================
FAIL: test_init_regular (test.TestDeck)
Test initialized cards without filter.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Items in the first set but not the second:
('diamonds', '10')
('spades', '10')
('hearts', '10')
('clubs', '10')
======================================================================
FAIL: test_correct_deck_init (test.TestPoker)
Test initialization with correct deck.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221115154139/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Items in the first set but not the second:
('diamonds', '10')
('spades', '10')
('hearts', '10')
('clubs', '10')
----------------------------------------------------------------------
Ran 15 tests in 0.208s
FAILED (failures=5, errors=5)
История (3 версии и 16 коментара)
Дейвид обнови решението на 10.11.2022 02:01 (преди над 2 години)
Дейвид обнови решението на 11.11.2022 14:16 (преди над 2 години)
Дейвид обнови решението на 11.11.2022 15:20 (преди над 2 години)
Смятам, че тези проверки са по-скоро излишни. Ако се опиташ да инстанцираш несъщестуваща карта, по-удачно е да хвърлиш грешка, а не да приемаш дадена стойност.