We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent2b9dbea commit65a5f45Copy full SHA for 65a5f45
src/embed_tests/Codecs.cs
@@ -218,13 +218,9 @@ public void SequenceDecoderTest()
218
Assert.IsFalse(codec.CanDecode(fooType,typeof(ICollection<int>)));
219
220
//python tuples do satisfy the python sequence protocol
221
-varpyTuple=newPyObject(Runtime.PyTuple_New(3));
+varpyTuple=newPyTuple(items.ToArray());
222
varpyTupleType=pyTuple.GetPythonType();
223
224
-Runtime.PyTuple_SetItem(pyTuple.Handle,0,items[0].Handle);
225
-Runtime.PyTuple_SetItem(pyTuple.Handle,1,items[1].Handle);
226
-Runtime.PyTuple_SetItem(pyTuple.Handle,2,items[2].Handle);
227
-
228
Assert.IsTrue(codec.CanDecode(pyTupleType,typeof(ICollection<float>)));
229
Assert.IsTrue(codec.CanDecode(pyTupleType,typeof(ICollection<int>)));
230
Assert.IsTrue(codec.CanDecode(pyTupleType,typeof(ICollection<string>)));