Пример #1
0
 def test_square_32(self):
     self.assertEqual(2147483648, on_square(32))
     self.assertEqual(4294967295, total_after(32))
Пример #2
0
 def test_square_2(self):
     self.assertEqual(2, on_square(2))
     self.assertEqual(3, total_after(2))
Пример #3
0
 def test_square_4(self):
     self.assertEqual(8, on_square(4))
     self.assertEqual(15, total_after(4))
Пример #4
0
 def test_square_16(self):
     self.assertEqual(32768, on_square(16))
     self.assertEqual(65535, total_after(16))
Пример #5
0
 def test_square_64(self):
     self.assertEqual(9223372036854775808, on_square(64))
     self.assertEqual(18446744073709551615, total_after(64))
Пример #6
0
 def test_total(self):
     self.assertEqual(total_after(64), 18446744073709551615)
Пример #7
0
 def test_square_3(self):
     self.assertEqual(4, on_square(3))
     self.assertEqual(7, total_after(3))
Пример #8
0
 def test_square_64(self):
     self.assertEqual(on_square(64), 9223372036854775808)
     self.assertEqual(total_after(64), 18446744073709551615)
Пример #9
0
 def test_square_negative_raises_exception(self):
     with self.assertRaises(ValueError):
         on_square(-1)
     with self.assertRaises(ValueError):
         total_after(-1)
Пример #10
0
 def test_square_16(self):
     self.assertEqual(on_square(16), 32768)
     self.assertEqual(total_after(16), 65535)
Пример #11
0
 def test_square_32(self):
     self.assertEqual(on_square(32), 2147483648)
     self.assertEqual(total_after(32), 4294967295)
Пример #12
0
 def test_square_4(self):
     self.assertEqual(on_square(4), 8)
     self.assertEqual(total_after(4), 15)
Пример #13
0
 def test_square_3(self):
     self.assertEqual(on_square(3), 4)
     self.assertEqual(total_after(3), 7)
Пример #14
0
 def test_square_2(self):
     self.assertEqual(on_square(2), 2)
     self.assertEqual(total_after(2), 3)
Пример #15
0
 def test_square_1(self):
     self.assertEqual(1, on_square(1))
     self.assertEqual(1, total_after(1))
Пример #16
0
 def test_square_gt_64_raises_exception(self):
     with self.assertRaises(ValueError):
         on_square(65)
     with self.assertRaises(ValueError):
         total_after(65)
Пример #17
0
 def test_square_gt_64_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         on_square(65)
     with self.assertRaisesWithMessage(ValueError):
         total_after(65)
Пример #18
0
 def test_square_1(self):
     self.assertEqual(on_square(1), 1)
     self.assertEqual(total_after(1), 1)
Пример #19
0
 def test_square_2(self):
     self.assertEqual(2, on_square(2))
     self.assertEqual(3, total_after(2))
Пример #20
0
 def test_square_2(self):
     assert_that(on_square(2), equal_to(2))
     assert_that(total_after(2), equal_to(3))
Пример #21
0
 def test_square_4(self):
     self.assertEqual(8, on_square(4))
     self.assertEqual(15, total_after(4))
Пример #22
0
 def test_square_3(self):
     assert_that(on_square(3), equal_to(4))
     assert_that(total_after(3), equal_to(7))
Пример #23
0
 def test_square_32(self):
     self.assertEqual(2147483648, on_square(32))
     self.assertEqual(4294967295, total_after(32))
Пример #24
0
 def test_square_4(self):
     assert_that(on_square(4), equal_to(8))
     assert_that(total_after(4), equal_to(15))
Пример #25
0
 def test_square_1(self):
     self.assertEqual(1, on_square(1))
     self.assertEqual(1, total_after(1))
Пример #26
0
 def test_square_16(self):
     assert_that(on_square(16), equal_to(32768))
     assert_that(total_after(16), equal_to(65535))
Пример #27
0
 def test_square_3(self):
     self.assertEqual(4, on_square(3))
     self.assertEqual(7, total_after(3))
Пример #28
0
 def test_square_32(self):
     assert_that(on_square(32), equal_to(2147483648))
     assert_that(total_after(32), equal_to(4294967295))
Пример #29
0
 def test_square_16(self):
     self.assertEqual(32768, on_square(16))
     self.assertEqual(65535, total_after(16))
Пример #30
0
 def test_square_64(self):
     assert_that(on_square(64), equal_to(9223372036854775808))
     assert_that(total_after(64), equal_to(18446744073709551615))
Пример #31
0
 def test_square_64(self):
     self.assertEqual(9223372036854775808, on_square(64))
     self.assertEqual(18446744073709551615, total_after(64))
Пример #32
0
 def test_square_1(self):
     assert_that(on_square(1), equal_to(1))
     assert_that(total_after(1), equal_to(1))
Пример #33
0
 def test_square_negative_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         on_square(-1)
     with self.assertRaisesWithMessage(ValueError):
         total_after(-1)
Пример #34
0
 def test_square_0_raises_exception(self):
     with self.assertRaises(ValueError):
         on_square(0)
     with self.assertRaises(ValueError):
         total_after(0)
Пример #35
0
 def test_total(self):
     self.assertEqual(total_after(64), 18446744073709551615)
Пример #36
0
 def test_square_0_raises_exception(self):
     with self.assertRaisesWithMessage(ValueError):
         on_square(0)
     with self.assertRaisesWithMessage(ValueError):
         total_after(0)