Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom types #283

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Call methods on Python objects

480edbd
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

custom types #283

Call methods on Python objects
480edbd
Select commit
Loading
Failed to load commit list.
GitHub Actions / .NET Test report windows-latest-3.9 failed Oct 18, 2024 in 0s

788 passed, 2 failed and 22 skipped

Tests failed

Report Passed Failed Skipped Time
Conda.Tests-windows-latest-3.9-net8.0.trx 1✔️ 6s
Conda.Tests-windows-latest-3.9-net9.0.trx 1✔️ 6s
CSnakes.Runtime.Tests-windows-latest-3.9-net8.0.trx 126✔️ 11✖️ 7s
CSnakes.Runtime.Tests-windows-latest-3.9-net9.0.trx 126✔️ 11✖️ 7s
CSnakes.Tests-windows-latest-3.9-net8.0.trx 171✔️ 12s
CSnakes.Tests-windows-latest-3.9-net9.0.trx 171✔️ 14s
Integration.Tests-windows-latest-3.9-net8.0.trx 94✔️ 1❌ 23s
Integration.Tests-windows-latest-3.9-net9.0.trx 98✔️ 1❌ 23s

✔️ Conda.Tests-windows-latest-3.9-net8.0.trx

1 tests were completed in 6s with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Conda.Tests.BasicTests 1✔️ 3s

✔️ Conda.Tests-windows-latest-3.9-net9.0.trx

1 tests were completed in 6s with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Conda.Tests.BasicTests 1✔️ 2s

✔️ CSnakes.Runtime.Tests-windows-latest-3.9-net8.0.trx

137 tests were completed in 7s with 126 passed, 0 failed and 11 skipped.

Test suite Passed Failed Skipped Time
CSnakes.Runtime.Tests.Converter.BigIntegerConverterTest 1✔️ 23ms
CSnakes.Runtime.Tests.Converter.BoolConverterTest 2✔️ 41ms
CSnakes.Runtime.Tests.Converter.BytesConverterTest 2✔️ 67ms
CSnakes.Runtime.Tests.Converter.DictionaryConverterTest 1✔️ 37ms
CSnakes.Runtime.Tests.Converter.DoubleConverterTest 10✔️ 192ms
CSnakes.Runtime.Tests.Converter.ListConverterTest 1✔️ 21ms
CSnakes.Runtime.Tests.Converter.LongConverterTest 7✔️ 217ms
CSnakes.Runtime.Tests.Converter.TupleConverterTests 5✔️ 264ms
CSnakes.Runtime.Tests.Converter.UnicodeConverterTest 6✔️ 131ms
CSnakes.Runtime.Tests.Locators.NuGetLocatorTests 7✔️ 1✖️ 15ms
CSnakes.Runtime.Tests.Locators.PythonLocatorTests 6✔️ 10✖️ 13ms
CSnakes.Runtime.Tests.Python.ImmortalTests 5✔️ 223ms
CSnakes.Runtime.Tests.Python.ImportTests 3✔️ 40ms
CSnakes.Runtime.Tests.Python.PyDictionaryTests 6✔️ 62ms
CSnakes.Runtime.Tests.Python.PyObjectTests 45✔️ 598ms
CSnakes.Runtime.Tests.ServiceCollectionTests 19✔️ 183ms

✔️ CSnakes.Runtime.Tests-windows-latest-3.9-net9.0.trx

137 tests were completed in 7s with 126 passed, 0 failed and 11 skipped.

Test suite Passed Failed Skipped Time
CSnakes.Runtime.Tests.Converter.BigIntegerConverterTest 1✔️ 36ms
CSnakes.Runtime.Tests.Converter.BoolConverterTest 2✔️ 52ms
CSnakes.Runtime.Tests.Converter.BytesConverterTest 2✔️ 34ms
CSnakes.Runtime.Tests.Converter.DictionaryConverterTest 1✔️ 21ms
CSnakes.Runtime.Tests.Converter.DoubleConverterTest 10✔️ 139ms
CSnakes.Runtime.Tests.Converter.ListConverterTest 1✔️ 21ms
CSnakes.Runtime.Tests.Converter.LongConverterTest 7✔️ 97ms
CSnakes.Runtime.Tests.Converter.TupleConverterTests 5✔️ 97ms
CSnakes.Runtime.Tests.Converter.UnicodeConverterTest 6✔️ 84ms
CSnakes.Runtime.Tests.Locators.NuGetLocatorTests 7✔️ 1✖️ 12ms
CSnakes.Runtime.Tests.Locators.PythonLocatorTests 6✔️ 10✖️ 12ms
CSnakes.Runtime.Tests.Python.ImmortalTests 5✔️ 214ms
CSnakes.Runtime.Tests.Python.ImportTests 3✔️ 41ms
CSnakes.Runtime.Tests.Python.PyDictionaryTests 6✔️ 101ms
CSnakes.Runtime.Tests.Python.PyObjectTests 45✔️ 630ms
CSnakes.Runtime.Tests.ServiceCollectionTests 19✔️ 199ms

✔️ CSnakes.Tests-windows-latest-3.9-net8.0.trx

171 tests were completed in 12s with 171 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CSnakes.Tests.CaseHelperTests 10✔️ 8ms
CSnakes.Tests.GeneratedSignatureTests 30✔️ 5s
CSnakes.Tests.PythonConstantTests+FloatTests 1✔️ 8ms
CSnakes.Tests.TokenizerTests 81✔️ 199ms
CSnakes.Tests.TypeReflectionTests 49✔️ 197ms

✔️ CSnakes.Tests-windows-latest-3.9-net9.0.trx

171 tests were completed in 14s with 171 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CSnakes.Tests.CaseHelperTests 10✔️ 6ms
CSnakes.Tests.GeneratedSignatureTests 30✔️ 5s
CSnakes.Tests.PythonConstantTests+FloatTests 1✔️ 3ms
CSnakes.Tests.TokenizerTests 81✔️ 205ms
CSnakes.Tests.TypeReflectionTests 49✔️ 238ms

❌ Integration.Tests-windows-latest-3.9-net8.0.trx

95 tests were completed in 23s with 94 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Integration.Tests.ArgsTests 6✔️ 27ms
Integration.Tests.BasicTests 9✔️ 61ms
Integration.Tests.BufferTests 27✔️ 1❌ 285ms
Integration.Tests.CustomTypesTests 1✔️ 8ms
Integration.Tests.DefaultsTests 7✔️ 7ms
Integration.Tests.ExceptionTests 2✔️ 8ms
Integration.Tests.FalseReturns 12✔️ 11ms
Integration.Tests.GeneratorTests 2✔️ 7ms
Integration.Tests.NoneTests 2✔️ 3ms
Integration.Tests.ReloadTests 3✔️ 13ms
Integration.Tests.TestDependency 1✔️ 179ms
Integration.Tests.TestDicts 5✔️ 20ms
Integration.Tests.TupleTests 17✔️ 45ms

❌ Integration.Tests.BufferTests

❌ TestNonBuffer
	Assert.Throws() Failure: Exception type was not an exact match
	Expected: typeof(System.InvalidCastException)
	Actual:   typeof(System.MissingMethodException)
	---- System.MissingMethodException : Cannot dynamically create an instance of type 'CSnakes.Runtime.Python.IPyBuffer'. Reason: Cannot create an instance of an interface.

❌ Integration.Tests-windows-latest-3.9-net9.0.trx

99 tests were completed in 23s with 98 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Integration.Tests.ArgsTests 6✔️ 22ms
Integration.Tests.BasicTests 9✔️ 54ms
Integration.Tests.BufferTests 31✔️ 1❌ 205ms
Integration.Tests.CustomTypesTests 1✔️ 7ms
Integration.Tests.DefaultsTests 7✔️ 6ms
Integration.Tests.ExceptionTests 2✔️ 7ms
Integration.Tests.FalseReturns 12✔️ 8ms
Integration.Tests.GeneratorTests 2✔️ 5ms
Integration.Tests.NoneTests 2✔️ 3ms
Integration.Tests.ReloadTests 3✔️ 10ms
Integration.Tests.TestDependency 1✔️ 118ms
Integration.Tests.TestDicts 5✔️ 9ms
Integration.Tests.TupleTests 17✔️ 45ms

❌ Integration.Tests.BufferTests

❌ TestNonBuffer
	Assert.Throws() Failure: Exception type was not an exact match
	Expected: typeof(System.InvalidCastException)
	Actual:   typeof(System.MissingMethodException)
	---- System.MissingMethodException : Cannot dynamically create an instance of type 'CSnakes.Runtime.Python.IPyBuffer'. Reason: Cannot create an instance of an interface.

Annotations

Check failure on line 365 in src/Integration.Tests/BufferTests.cs

See this annotation in the file changed.

@github-actions github-actions / .NET Test report windows-latest-3.9

Integration.Tests.BufferTests ► TestNonBuffer

Failed test found in:
  Integration.Tests-windows-latest-3.9-net8.0.trx
Error:
  Assert.Throws() Failure: Exception type was not an exact match
  Expected: typeof(System.InvalidCastException)
  Actual:   typeof(System.MissingMethodException)
  ---- System.MissingMethodException : Cannot dynamically create an instance of type 'CSnakes.Runtime.Python.IPyBuffer'. Reason: Cannot create an instance of an interface.
Raw output
Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.InvalidCastException)
Actual:   typeof(System.MissingMethodException)
---- System.MissingMethodException : Cannot dynamically create an instance of type 'CSnakes.Runtime.Python.IPyBuffer'. Reason: Cannot create an instance of an interface.
   at Integration.Tests.BufferTests.TestNonBuffer() in /_/src/Integration.Tests/BufferTests.cs:line 365
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
----- Inner Stack Trace -----
   at System.RuntimeType.ActivatorCache..ctor(RuntimeType rt)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at CSnakes.Runtime.PyObjectTypeConverter.PyObjectToManagedType(PyObject pyObject, Type destinationType) in /_/src/CSnakes.Runtime/PyObjectTypeConverter.cs:line 44
   at CSnakes.Runtime.Python.PyObject.As(Type type) in /_/src/CSnakes.Runtime/Python/PyObject.cs:line 473
   at CSnakes.Runtime.Python.PyObject.As[T]() in /_/src/CSnakes.Runtime/Python/PyObject.cs:line 440
   at CSnakes.Runtime.TestBufferExtensions.TestBufferInternal.TestNonBuffer() in /_/src/Integration.Tests/obj/Debug/net8.0/generated/CSnakes.SourceGeneration/CSnakes.PythonStaticGenerator/TestBuffer.py.cs:line 449

Check failure on line 365 in src/Integration.Tests/BufferTests.cs

See this annotation in the file changed.

@github-actions github-actions / .NET Test report windows-latest-3.9

Integration.Tests.BufferTests ► TestNonBuffer

Failed test found in:
  Integration.Tests-windows-latest-3.9-net9.0.trx
Error:
  Assert.Throws() Failure: Exception type was not an exact match
  Expected: typeof(System.InvalidCastException)
  Actual:   typeof(System.MissingMethodException)
  ---- System.MissingMethodException : Cannot dynamically create an instance of type 'CSnakes.Runtime.Python.IPyBuffer'. Reason: Cannot create an instance of an interface.
Raw output
Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.InvalidCastException)
Actual:   typeof(System.MissingMethodException)
---- System.MissingMethodException : Cannot dynamically create an instance of type 'CSnakes.Runtime.Python.IPyBuffer'. Reason: Cannot create an instance of an interface.
   at Integration.Tests.BufferTests.TestNonBuffer() in /_/src/Integration.Tests/BufferTests.cs:line 365
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
----- Inner Stack Trace -----
   at System.RuntimeType.ActivatorCache..ctor(RuntimeType rt)
   at System.RuntimeType.ActivatorCache.Create(RuntimeType type)
   at System.RuntimeType.IGenericCacheEntry`1.CreateAndCache(RuntimeType type)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at CSnakes.Runtime.PyObjectTypeConverter.PyObjectToManagedType(PyObject pyObject, Type destinationType) in /_/src/CSnakes.Runtime/PyObjectTypeConverter.cs:line 44
   at CSnakes.Runtime.Python.PyObject.As(Type type) in /_/src/CSnakes.Runtime/Python/PyObject.cs:line 473
   at CSnakes.Runtime.Python.PyObject.As[T]() in /_/src/CSnakes.Runtime/Python/PyObject.cs:line 440
   at CSnakes.Runtime.TestBufferExtensions.TestBufferInternal.TestNonBuffer() in /_/src/Integration.Tests/obj/Debug/net9.0/generated/CSnakes.SourceGeneration/CSnakes.PythonStaticGenerator/TestBuffer.py.cs:line 449