def testConversionInBothDirections(self): '''Test converting a map from Python to C++ and back again.''' mu = MapUser() map_ = {'odds' : [2, 4, 6], 'evens' : [3, 5, 7], 'primes' : [3, 4, 6]} mu.setMap(map_) result = mu.getMap() self.assertEqual(result, map_)
def testConversionMapIntKeyValueTypeValue(self): '''C++ signature: MapUser::passMapIntValueType(const std::map<int, const ByteArray>&)''' mu = MapUser() map_ = {0 : 'string'} result = mu.passMapIntValueType(map_) self.assertEqual(map_, result)
def __init__(self): MapUser.__init__(self) self.create_map_called = False