def test_single_3(self): ''' Test the collatz_single() function with value 1. ''' cycle_result = collatz_single(1) self.assertEqual(cycle_result, 1)
def test_collatz_single5 (self) : number = 1 cache = [-1, -1, -1, -1, -1, -1, -1, -1] cacheTrace = [-1] * 20 v = collatz_single(number, cache, cacheTrace) self.assert_(v == 1)
def test_single_2(self): ''' Test the collatz_single() function with value 5. ''' cycle_result = collatz_single(5) self.assertEqual(cycle_result, 6)
def test_single_2 (self) : v = collatz_single(2) self.assertTrue(v == 2)
def test_single_3 (self) : v = collatz_single(3) self.assertTrue(v == 8)
def test_single_6 (self) : s = collatz_single(80085,{ 1 : 1}) self.assert_(s == 33)
def test_single_1 (self) : v = collatz_single(1) self.assertTrue(v == 1)
def test_single_4 (self) : s = collatz_single(99999,{ 1 : 1}) self.assert_(s == 227)
def test_single_5 (self) : s = collatz_single(420,{ 1 : 1}) self.assert_(s == 41)
def test_single_2 (self) : s = collatz_single(100,{ 1 : 1}) self.assert_(s == 26)
def test_single_3 (self) : s = collatz_single(1000,{ 1 : 1}) self.assert_(s == 112)
def test_single_1 (self) : s = collatz_single(10,{ 1 : 1}) self.assert_(s == 7)
def test_single_3 (self) : v = collatz_single(1) self.assertEqual(v, 1)
def test_single_2 (self) : v = collatz_single(10) self.assertEqual(v, 7)
def test_single_1 (self) : v = collatz_single(5) self.assertEqual(v, 6)
def test_single (self) : count = collatz_single (2) self.assertTrue(count == 2)