Exemplo n.º 1
0
 def test_grains_on_square_3(self):
     self.assertEqual(square(3), 4)
Exemplo n.º 2
0
 def test_square_greater_than_64_raises_an_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(65)
Exemplo n.º 3
0
 def test_grains_on_square_1(self):
     self.assertEqual(square(1), 1)
Exemplo n.º 4
0
 def test_16(self):
     self.assertEqual(square(16), 32768)
Exemplo n.º 5
0
 def test_64(self):
     self.assertEqual(square(64), 9223372036854775808)
Exemplo n.º 6
0
 def test_square_3(self):
     self.assertEqual(square(3), 4)
Exemplo n.º 7
0
 def test_3(self):
     self.assertEqual(square(3), 4)
Exemplo n.º 8
0
 def test_square_gt_64_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(65)
     with self.assertRaisesWithMessage(ValueError):
         total(65)
Exemplo n.º 9
0
 def test_square_1(self):
     self.assertEqual(square(1), 1)
Exemplo n.º 10
0
 def test_square_64(self):
     self.assertEqual(square(64), 9223372036854775808)
Exemplo n.º 11
0
 def test_square_negative_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(-1)
     with self.assertRaisesWithMessage(ValueError):
         total(-1)
Exemplo n.º 12
0
 def test_square_32(self):
     self.assertEqual(square(32), 2147483648)
Exemplo n.º 13
0
 def test_square_16(self):
     self.assertEqual(square(16), 32768)
Exemplo n.º 14
0
 def test_square_4(self):
     self.assertEqual(square(4), 8)
Exemplo n.º 15
0
 def test_grains_on_square_16(self):
     self.assertEqual(square(16), 32768)
Exemplo n.º 16
0
 def test_3(self):
     assert square(3) == 4
Exemplo n.º 17
0
 def test_grains_on_square_64(self):
     self.assertEqual(square(64), 9223372036854775808)
Exemplo n.º 18
0
 def test_4(self):
     assert square(4) == 8
Exemplo n.º 19
0
 def test_2(self):
     self.assertEqual(square(2), 2)
Exemplo n.º 20
0
 def test_16(self):
     assert square(16) == 32768
Exemplo n.º 21
0
 def test_4(self):
     self.assertEqual(square(4), 8)
Exemplo n.º 22
0
 def test_32(self):
     assert square(32) == 2147483648
Exemplo n.º 23
0
 def test_32(self):
     self.assertEqual(square(32), 2147483648)
Exemplo n.º 24
0
 def test_64(self):
     assert square(64) == 9223372036854775808
Exemplo n.º 25
0
 def test_negative_square_raises_an_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(-1)
Exemplo n.º 26
0
 def test_square_0_raises_an_exception(self):
     with pytest.raises(ValueError):
         square(0)
Exemplo n.º 27
0
 def test_1(self):
     self.assertEqual(square(1), 1)
Exemplo n.º 28
0
 def test_negative_square_raises_an_exception(self):
     with pytest.raises(ValueError):
         square(-1)
Exemplo n.º 29
0
 def test_grains_on_square_2(self):
     self.assertEqual(square(2), 2)
Exemplo n.º 30
0
 def test_square_greater_than_64_raises_an_exception(self):
     with pytest.raises(ValueError):
         square(65)
Exemplo n.º 31
0
 def test_grains_on_square_4(self):
     self.assertEqual(square(4), 8)
Exemplo n.º 32
0
 def test_1(self):
     assert square(1) == 1
Exemplo n.º 33
0
 def test_grains_on_square_32(self):
     self.assertEqual(square(32), 2147483648)
Exemplo n.º 34
0
 def test_2(self):
     assert square(2) == 2
Exemplo n.º 35
0
 def test_square_0_raises_an_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         square(0)
Exemplo n.º 36
0
 def test_square_2(self):
     self.assertEqual(square(2), 2)