def testConversionInBothDirections(self): '''Test converting a list from Python to C++ and back again.''' lu = ListUser() lst = [3, 5, 7] lu.setList(lst) result = lu.getList() self.assertEqual(result, lst)
def testConversionInBothDirectionsWithSimilarContainer(self): '''Test converting a tuple, instead of the expected list, from Python to C++ and back again.''' lu = ListUser() lst = (3, 5, 7) lu.setList(lst) result = lu.getList() self.assertNotEqual(result, lst) self.assertEqual(result, list(lst))