def test_iteration(self): """Tests the iteration""" x = IteratorOfTwistedIntegers(TwistedIntegers(3)) j = 0 for i in x: self.assertEqual("<" + str(j) + ":3>", str(i)) j += 1
def test_iteration_mulValidHundred(self): """Tests the multiplication function of the iterator when n = 100""" self.assertEqual(['<0:100>'], IteratorOfTwistedIntegers.multiplication(100))
def test_iteration_mulValidFortyTwo(self): """Tests the multiplication function of the iterator when n = 42""" self.assertEqual(['<0:42>'], IteratorOfTwistedIntegers.multiplication(42))
def test_iteration_mulValidTwenty(self): """Tests the multiplication function of the iterator when n = 20""" self.assertEqual(['<0:20>'], IteratorOfTwistedIntegers.multiplication(20))
def test_iteration_mulValidFive(self): """Tests the multiplication function of the iterator when n = 5""" self.assertEqual(['<0:5>'], IteratorOfTwistedIntegers.multiplication(5))
def test_iteration_addValidFive(self): """Tests the addition function of the iterator when n = 5""" self.assertEqual(['<0:5>'], IteratorOfTwistedIntegers.addition(5))