We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f59335f commit bd94e49Copy full SHA for bd94e49
1 file changed
src/embed_tests/TestConverter.cs
@@ -186,5 +186,17 @@ public void RawPyObjectProxy()
186
var proxiedHandle = pyObjectProxy.GetAttr("Handle").As<IntPtr>();
187
Assert.AreEqual(pyObject.Handle, proxiedHandle);
188
}
189
+
190
+ [Test]
191
+ public void PrimitiveIntConversion()
192
+ {
193
+ decimal value = 10;
194
+ var pyValue = value.ToPython();
195
196
+ // Try to convert python value to int
197
+ var testInt = pyValue.As<int>();
198
+ Assert.AreEqual(testInt , 10);
199
+ }
200
201
202
0 commit comments