Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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))
Example #4
0
 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))