Beispiel #1
0
 def test_merge(self):
     boggs = Player("Wade Boggs", 26, 1, "P", LEFT)
     boggs2 = Player("Wade Boggs", 26, 1, "P", LEFT)
     self.assertEqual(boggs, boggs2)
     boggs2.number = None
     boggs.merge(boggs2)
     self.assertEqual(boggs.number, 26)
Beispiel #2
0
 def test_merge(self):
     boggs = Player("Wade Boggs", 26, 1, "P", LEFT)
     boggs2 = Player("Wade Boggs", 26, 1, "P", LEFT)
     self.assertEqual(boggs, boggs2)
     boggs2.number = None
     boggs.merge(boggs2)
     self.assertEqual(boggs.number, 26)
Beispiel #3
0
 def test_merge_keep_longer_name(self):
     boggs = Player("Wade Boggs", 26, 1, "P", LEFT)
     boggs2 = Player("Boggs, W", 26, 1, "P", LEFT)
     boggs.merge(boggs2)
     self.assertEqual(boggs.name, "Wade Boggs")
Beispiel #4
0
 def test_merge_keep_longer_name(self):
     boggs = Player("Wade Boggs", 26, 1, "P", LEFT)
     boggs2 = Player("Boggs, W", 26, 1, "P", LEFT)
     boggs.merge(boggs2)
     self.assertEqual(boggs.name, "Wade Boggs")