示例#1
0
 def test_set_status_count_2_dead(self):
     cell_object = Cell()
     cell_object.current_status = False
     self.assertEqual(cell_object.set_status(2), False)
示例#2
0
 def test_set_status_count_2_alive(self):
     cell_object = Cell()
     cell_object.current_status = True
     self.assertEqual(cell_object.set_status(2), True)
示例#3
0
 def test_print_status_live(self):
     cell_object = Cell()
     cell_object.current_status = True
     self.assertEqual(cell_object.print_status(), '[X]')
示例#4
0
 def test_print_status_dead(self):
     cell_object = Cell()
     cell_object.current_status = False
     self.assertEqual(cell_object.print_status(), '[ ]')
示例#5
0
 def test_upgrade_status_2(self):
     cell_object = Cell()
     cell_object.prev_status = False
     cell_object.current_status = True
     self.assertEqual(cell_object.upgrade_status(), True)