diff options
-rw-r--r-- | tests/samplebinding/pair_conversions.h | 4 | ||||
-rwxr-xr-x | tests/samplebinding/pair_test.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/samplebinding/pair_conversions.h b/tests/samplebinding/pair_conversions.h index 8adf2f6f3..b1df3c5fe 100644 --- a/tests/samplebinding/pair_conversions.h +++ b/tests/samplebinding/pair_conversions.h @@ -13,8 +13,8 @@ struct Converter_std_pair static StdPair toCpp(PyObject* pyobj) { StdPair result; - PyObject* pyFirst = PyTuple_GET_ITEM(pyobj, 0); - PyObject* pySecond = PyTuple_GET_ITEM(pyobj, 1); + PyObject* pyFirst = PySequence_GetItem(pyobj, 0); + PyObject* pySecond = PySequence_GetItem(pyobj, 1); result.first = Converter<typename StdPair::first_type>::toCpp(pyFirst); result.second = Converter<typename StdPair::second_type>::toCpp(pySecond); return result; diff --git a/tests/samplebinding/pair_test.py b/tests/samplebinding/pair_test.py index 212fabfc8..fd82dde3a 100755 --- a/tests/samplebinding/pair_test.py +++ b/tests/samplebinding/pair_test.py @@ -69,7 +69,7 @@ class PairConversionTest(unittest.TestCase): pu.setPair(pair) result = pu.getPair() self.assertNotEqual(result, pair) - self.assertEqual(result, list(pair)) + self.assertEqual(result, tuple(pair)) if __name__ == '__main__': unittest.main() |