Ejemplo n.º 1
0
	def test_function_behaviour5(self):
		""" Answer 2 with input [8, 5, 6, 7, 2, 6, 6, 8], 8 """
		with patch("builtins.input", return_value="1") as input_call:
			import attempt
			a= attempt.how_many([8, 5, 6, 7, 2, 6, 6, 8], 8)
			self.assertEqual(a, 2)
Ejemplo n.º 2
0
	def test_function_behaviour2(self):
		""" Answer 2 with input [1,1], 1 """
		with patch("builtins.input", return_value="1") as input_call:
			import attempt
			a= attempt.how_many([1,1], 1)
			self.assertEqual(a, 2)