def test_get_number_of_iterations_starting_on_2_should_return_1(self): measurer = CollatzConjectureMeasurer() n = measurer.apply_collatz_conjecture(2) self.assertIs(n == 1, True, "Iteration number was: " + str(n))
def test_get_number_of_iterations_starting_on_negative_number_should_raise_value_error_exception(self): with self.assertRaises(ValueError): measurer = CollatzConjectureMeasurer() n = measurer.apply_collatz_conjecture(-1)