Exemplo n.º 1
0
 def test_makeplayerpool_10bobs_lastisbob9(self):
     pool = factory.make_playerpool(quantity=10)
     expected = 'bob9'
     result = pool[-1].name
     self.assertEqual(expected, result)
Exemplo n.º 2
0
 def test_makeplayerpool_10random_allunique(self):
     pool = factory.make_playerpool(quantity=10, names='random')
     expected = 10
     result = len(set([p.name for p in pool]))
     self.assertEqual(expected, result)
Exemplo n.º 3
0
 def test_makeplayerpool_qty10_len10(self):
     pool = factory.make_playerpool(quantity=10)
     expected = 10
     result = len(pool)
     self.assertEqual(expected, result)
Exemplo n.º 4
0
 def test_makeplayerpool_1defaultname_isbob0(self):
     pool = factory.make_playerpool(quantity=1)
     expected = 'bob0'
     result = pool[0].name
     self.assertEqual(expected, result)
Exemplo n.º 5
0
 def test_makeplayerpool_1FISH_isFISH(self):
     ptype = 'FISH'
     pool = factory.make_playerpool(quantity=1, types=ptype)
     expected = ptype
     result = pool[0].playertype
     self.assertEqual(expected, result)
Exemplo n.º 6
0
 def test_makeplayerpool_qty1_hasbank(self):
     pool = factory.make_playerpool(quantity=1)
     expected = factory.CPU_BANK_BITS
     result = pool[0].bank
     self.assertEqual(expected, result)
Exemplo n.º 7
0
 def setUp(self):
     self.pool = factory.make_playerpool(quantity=10)