forked from emilybache/Tennis-Refactoring-Kata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfull_test_report.txt
54 lines (46 loc) · 6.73 KB
/
full_test_report.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
============================= test session starts =============================
platform win32 -- Python 3.12.0, pytest-8.1.1, pluggy-1.4.0
rootdir: C:\EPSI\maintenabilitÚ\Tennis-Refactoring-Kata\python
collected 233 items
golden_master_test.py .F [ 0%]
tennis_test.py ......................................................... [ 25%]
........................................................................ [ 56%]
........................................................................ [ 87%]
.............................. [100%]
================================== FAILURES ===================================
_______________ GoldenMasterTest.test_player_name_independence ________________
self = <golden_master_test.GoldenMasterTest testMethod=test_player_name_independence>
def test_player_name_independence(self):
# Ce test vÚrifie si les scores sont cohÚrents malgrÚ le changement des noms des joueurs.
# Ce test est effectuÚ que pour mettre en Úvidence le problÞme sur la version non refactorisÚe.
game_with_standard_names = OriginalTennisGame("player1", "player2")
game_with_different_names = OriginalTennisGame("p1", "p2")
refactored_game_with_standard_names = RefactoredTennisGame("player1", "player2")
refactored_game_with_different_names = RefactoredTennisGame("p1", "p2")
for p1_points, p2_points in self.test_cases:
for _ in range(p1_points):
game_with_standard_names.won_point("player1")
game_with_different_names.won_point("p1")
refactored_game_with_standard_names.won_point("player1")
refactored_game_with_different_names.won_point("p1")
for _ in range(p2_points):
game_with_standard_names.won_point("player2")
game_with_different_names.won_point("p2")
refactored_game_with_standard_names.won_point("player2")
refactored_game_with_different_names.won_point("p2")
score_with_standard_names = game_with_standard_names.score()
score_with_different_names = game_with_different_names.score()
refactored_score_with_standard_names = refactored_game_with_standard_names.score()
refactored_score_with_different_names = refactored_game_with_different_names.score()
> self.assertEqual(score_with_standard_names, score_with_different_names,
f"Scores on the original version do not match for games with different player names. "
f"With 'player1' and 'player2': {score_with_standard_names}. "
f"With 'p1' and 'p2': {score_with_different_names}.")
E AssertionError: 'Fifteen-All' != 'Love-Thirty'
E - Fifteen-All
E + Love-Thirty
E : Scores on the original version do not match for games with different player names. With 'player1' and 'player2': Fifteen-All. With 'p1' and 'p2': Love-Thirty.
golden_master_test.py:69: AssertionError
=========================== short test summary info ===========================
FAILED golden_master_test.py::GoldenMasterTest::test_player_name_independence
======================== 1 failed, 232 passed in 0.21s ========================