Exemple #1
0
 def test_team_remove_fail(self):
     t = Team("Best", 10)
     p = Player("Pall", 3, 3, 3, 3, 3)
     result = "Player Pall not found"
     exp = t.remove_player("Pall")
     self.assertEqual(exp, result)
Exemple #2
0
from project.player import Player
from project.team import Team

p = Player("Pall", 1, 3, 5, 7)

print("Player name:", p.name)
print("Points sprint:", p._Player__sprint)
print("Points dribble:", p._Player__dribble)
print("Points passing:", p._Player__passing)
print("Points shooting:", p._Player__shooting)

print("\ncalling the __str__ method")
print(p)

print("\nAbout the team")
t = Team("Best", 10)
print("Team name:", t._Team__name)
print("Teams points:", t._Team__rating)
print("Teams players:", len(t._Team__players))
print(t.add_player(p))
print(t.add_player(p))
print("Teams players:", len(t._Team__players))
print(t.remove_player("Pall"))
print(t.remove_player("Pall"))
Exemple #3
0
 def test_team_remove_successful(self):
     t = Team("Best", 10)
     p = Player("Pall", 3, 3, 3, 3, 3)
     t.add_player(p)
     exp = t.remove_player("Pall")
     self.assertEqual(exp, p)