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