def test_triplet4(self):
     ans = set([(175, 288, 337), (288, 20735, 20737)])
     self.assertEqual(ans, primitive_triplets(288))
 def test_triplet2(self):
     ans = set([(13, 84, 85), (84, 187, 205), (84, 437, 445),
                (84, 1763, 1765)])
     self.assertEqual(ans, primitive_triplets(84))
 def test_triplet3(self):
     ans = set([(29, 420, 421), (341, 420, 541), (420, 851, 949),
                (420, 1189, 1261), (420, 1739, 1789), (420, 4891, 4909),
                (420, 11021, 11029), (420, 44099, 44101)])
     self.assertEqual(ans, primitive_triplets(420))
 def test_odd_number(self):
     with self.assertRaisesWithMessage(ValueError):
         primitive_triplets(5)
 def test_triplet1(self):
     ans = set([(3, 4, 5)])
     self.assertEqual(ans, primitive_triplets(4))
 def test_triplet3(self):
     ans = set([(29, 420, 421), (341, 420, 541), (420, 851, 949),
                (420, 1189, 1261), (420, 1739, 1789), (420, 4891, 4909),
                (420, 11021, 11029), (420, 44099, 44101)])
     self.assertEqual(primitive_triplets(420), ans)
 def test_triplet4(self):
     ans = set([(175, 288, 337), (288, 20735, 20737)])
     self.assertEqual(primitive_triplets(288), ans)
 def test_triplet1(self):
     ans = set([(3, 4, 5)])
     self.assertEqual(primitive_triplets(4), ans)
 def test_triplet2(self):
     ans = set([(13, 84, 85), (84, 187, 205), (84, 437, 445),
                (84, 1763, 1765)])
     self.assertEqual(primitive_triplets(84), ans)
Ejemplo n.º 10
0
 def test_triplet2(self):
     ans = {(13, 84, 85), (84, 187, 205), (84, 437, 445), (84, 1763, 1765)}
     self.assertEqual(ans, primitive_triplets(84))
Ejemplo n.º 11
0
 def test_triplet4(self):
     ans = {(175, 288, 337), (288, 20735, 20737)}
     self.assertEqual(ans, primitive_triplets(288))
Ejemplo n.º 12
0
 def test_triplet1(self):
     ans = {(3, 4, 5)}
     self.assertEqual(ans, primitive_triplets(4))
Ejemplo n.º 13
0
 def test_odd_number(self):
     with self.assertRaises(ValueError) as context:
         primitive_triplets(5)
     self.assertEqual(context.exception.message, 'Argument must be divisible by 4')
Ejemplo n.º 14
0
 def test_triplet5(self):
     ans = {(100000, 9765369, 9765881), (100000, 2499999999, 2500000001)}
     self.assertEqual(ans, primitive_triplets(100000))
Ejemplo n.º 15
0
 def test_triplet1(self):
     ans = {(3, 4, 5)}
     self.assertEqual(ans, primitive_triplets(4))
Ejemplo n.º 16
0
 def test_odd_number(self):
     with self.assertRaisesWithMessage(ValueError):
         primitive_triplets(5)