Exemplo n.º 1
0
 def test_returns_the_total_number_of_grains_on_the_board(self):
     self.assertEqual(total(), 18446744073709551615)
Exemplo n.º 2
0
 def test_square_gt_64_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(65)
     with self.assertRaisesWithMessage(ValueError):
         total(65)
Exemplo n.º 3
0
 def test_total(self):
     self.assertEqual(total(64), 18446744073709551615)
Exemplo n.º 4
0
 def test_square_negative_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(-1)
     with self.assertRaisesWithMessage(ValueError):
         total(-1)
Exemplo n.º 5
0
 def test_returns_the_total_number_of_grains_on_the_board(self):
     assert total() == 18446744073709551615
Exemplo n.º 6
0
 def test_total(self):
     self.assertEqual(total(64), 18446744073709551615)
Exemplo n.º 7
0
 def test_square_gt_64_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(65)
     with self.assertRaisesWithMessage(ValueError):
         total(65)
Exemplo n.º 8
0
 def test_square_negative_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(-1)
     with self.assertRaisesWithMessage(ValueError):
         total(-1)