Exemple #1
0
 def test_problem_statement_cases(self):
     self.assertEqual([(2, 2)], goldbach(4))
     self.assertEqual([(3, 3)], goldbach(6))
     self.assertEqual([(3, 5)], goldbach(8))
     self.assertEqual([(3, 7), (5, 5)], goldbach(10))
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59),
                       (47, 53)], goldbach(100))
Exemple #2
0
 def test_goldbach(self):
     self.assertEqual([(2, 2)], goldbach(4))
     self.assertEqual([(3, 3)], goldbach(6))
     self.assertEqual([(3, 5)], goldbach(8))
     self.assertEqual([(3 ,7), (5, 5)], goldbach(10))
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)],
         goldbach(100))
Exemple #3
0
 def test_goldbach(self):
     self.assertEqual([(2, 2)], goldbach(4))
     self.assertEqual([(3, 3)], goldbach(6))
     self.assertEqual([(3, 5)], goldbach(8))
     self.assertEqual([(3, 7), (5, 5)], goldbach(10))
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59),
                       (47, 53)], goldbach(100))
Exemple #4
0
 def test_goldbach(self):
     expected = [(2, 2)]
     self.assertEqual(expected, solution.goldbach(4))
     expected = [(3, 7), (5, 5)]
     self.assertEqual(expected, solution.goldbach(10))
     expected = [(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)]
     self.assertEqual(expected, solution.goldbach(100))
 def test_goldbach(self):
     res1 = [(2, 2)]
     res2 = [(3, 3)]
     res3 = [(3, 5)]
     res4 = [(3, 7), (5, 5)]
     res5 = [(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)]
     self.assertEqual(res1, goldbach(4))
     self.assertEqual(res2, goldbach(6))
     self.assertEqual(res3, goldbach(8))
     self.assertEqual(res4, goldbach(10))
     self.assertEqual(res5, goldbach(100))
Exemple #6
0
 def test_1(self):
     self.assertEqual([(2, 2)], solution.goldbach(4))
Exemple #7
0
 def test_4(self):
     self.assertEqual([(3, 7), (5, 5)], solution.goldbach(10))
 def test_goldbach_1(self):
     self.assertEqual([(2, 2)], solution.goldbach(4))
 def test_goldbach_4(self):
     self.assertEqual([(3, 7), (5, 5)], solution.goldbach(10))
Exemple #10
0
 def test_100(self):
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59),
                       (47, 53), (53, 47), (59, 41), (71, 29), (83, 17),
                       (89, 11), (97, 3)], goldbach(100))
Exemple #11
0
 def test_goldbach5(self):
     self.assertEqual([], solution.goldbach(17))
Exemple #12
0
	def test_goldbach_1(self):
		self.assertEqual([(3,7), (5,5)], goldbach(10))
Exemple #13
0
	def test_goldbach_2(self):
		self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)], goldbach(100))
 def test_more_coombinations(self):
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)],goldbach(100))
 def test_one_combination(self):
     self.assertEqual([(3,3)],goldbach(6))
Exemple #16
0
 def test_8(self):
     self.assertEqual([(3, 5), (5, 3)], goldbach(8))
Exemple #17
0
	def test_3(self):
		self.assertEqual([(3,5)], goldbach(8))
Exemple #18
0
	def test_1(self):
		self.assertEqual([(2,2)], goldbach(4))
Exemple #19
0
	def test_2(self):
		self.assertEqual([(3,3)], goldbach(6))
 def test_goldbach_3(self):
     self.assertEqual([(3, 5)], solution.goldbach(8))
 def test_one_combination(self):
     self.assertEqual([(3, 3)], goldbach(6))
 def test_goldbach_5(self):
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59),
                       (47, 53)], solution.goldbach(100))
 def test_more_coombinations(self):
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59),
                       (47, 53)], goldbach(100))
 def test_goldbach_2(self):
     self.assertEqual([(3, 3)], solution.goldbach(6))
 def test_goldbach5(self):
     self.assertEqual([], solution.goldbach(17))
Exemple #26
0
 def test_3(self):
     self.assertEqual([(3, 5)], solution.goldbach(8))
Exemple #27
0
 def test_with_9(self):
     self.assertEqual(solution.goldbach(9), [(2, 7)])
Exemple #28
0
 def test_5(self):
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)], solution.goldbach(100))
Exemple #29
0
 def test_with_24(self):
     self.assertEqual(solution.goldbach(24), [(5, 19), (7, 17), (11, 13)])
Exemple #30
0
 def test_2(self):
     self.assertEqual([(3, 3)], solution.goldbach(6))
Exemple #31
0
 def test_with_5(self):
     self.assertEqual(solution.goldbach(5), [(2, 3)])
Exemple #32
0
 def test_6(self):
     self.assertEqual([(3, 3)], goldbach(6))
Exemple #33
0
 def test_with_7(self):
     self.assertEqual(solution.goldbach(7), [(2, 5)])
Exemple #34
0
 def test_10(self):
     self.assertEqual([(3, 7), (5, 5), (7, 3)], goldbach(10))
Exemple #35
0
 def test_problem_statement_cases(self):
     self.assertEqual([(2, 2)], goldbach(4))
     self.assertEqual([(3, 3)], goldbach(6))
     self.assertEqual([(3, 5)], goldbach(8))
     self.assertEqual([(3, 7), (5, 5)], goldbach(10))
     self.assertEqual([(3, 97), (11, 89), (17, 83), (29, 71), (41, 59), (47, 53)], goldbach(100))
Exemple #36
0
 def test_4(self):
     self.assertEqual([(2, 2)], goldbach(4))
 def test_goldblach(self):
     self.assertEqual(goldbach(4), [(2, 2)])
     self.assertEqual(goldbach(100), [(3, 97), (11, 89), (17, 83),
                                      (29, 71), (41, 59), (47, 53)])