def test_copyunder6_isgenuinecopy(self): original = [1, 2, 3, 4, 5] testlist = functions.copyElementsUnder(original, 3) self.assertEqual(original, [1, 2, 3, 4, 5])
def test_copyunder5_allmatches(self): original = [1, 2, 3, 4, 5] testlist = functions.copyElementsUnder(original, 6) self.assertEqual(testlist, [1, 2, 3, 4, 5])
def test_copyunder2_firstelement(self): original = [5, 4, 3, 2, 1] testlist = functions.copyElementsUnder(original, 2) self.assertEqual(testlist, [1])
def test_copyunder3_severalelements(self): original = [3, 5, 1, 4, 2] testlist = functions.copyElementsUnder(original, 4) self.assertEqual(testlist, [3, 1, 2])
def test_copyunder1_lastelement(self): original = [1, 2, 3, 4, 5] testlist = functions.copyElementsUnder(original, 2) self.assertEqual(testlist, [1])