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 macos-latest-3.13 failed Oct 18, 2024 in 0s

776 passed, 2 failed and 34 skipped

Tests failed

Report Passed Failed Skipped Time
Conda.Tests-macos-latest-3.13-net8.0.trx 1✔️ 3s
Conda.Tests-macos-latest-3.13-net9.0.trx 1✔️ 2s
CSnakes.Runtime.Tests-macos-latest-3.13-net8.0.trx 120✔️ 17✖️ 7s
CSnakes.Runtime.Tests-macos-latest-3.13-net9.0.trx 120✔️ 17✖️ 7s
CSnakes.Tests-macos-latest-3.13-net8.0.trx 171✔️ 6s
CSnakes.Tests-macos-latest-3.13-net9.0.trx 171✔️ 6s
Integration.Tests-macos-latest-3.13-net8.0.trx 94✔️ 1❌ 10s
Integration.Tests-macos-latest-3.13-net9.0.trx 98✔️ 1❌ 10s

✔️ Conda.Tests-macos-latest-3.13-net8.0.trx

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

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

✔️ Conda.Tests-macos-latest-3.13-net9.0.trx

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

Test suite Passed Failed Skipped Time
Conda.Tests.BasicTests 1✔️ 683ms

✔️ CSnakes.Runtime.Tests-macos-latest-3.13-net8.0.trx

137 tests were completed in 7s with 120 passed, 0 failed and 17 skipped.

Test suite Passed Failed Skipped Time
CSnakes.Runtime.Tests.Converter.BigIntegerConverterTest 1✔️ 44ms
CSnakes.Runtime.Tests.Converter.BoolConverterTest 2✔️ 76ms
CSnakes.Runtime.Tests.Converter.BytesConverterTest 2✔️ 93ms
CSnakes.Runtime.Tests.Converter.DictionaryConverterTest 1✔️ 53ms
CSnakes.Runtime.Tests.Converter.DoubleConverterTest 10✔️ 439ms
CSnakes.Runtime.Tests.Converter.ListConverterTest 1✔️ 42ms
CSnakes.Runtime.Tests.Converter.LongConverterTest 7✔️ 330ms
CSnakes.Runtime.Tests.Converter.TupleConverterTests 5✔️ 288ms
CSnakes.Runtime.Tests.Converter.UnicodeConverterTest 6✔️ 335ms
CSnakes.Runtime.Tests.Locators.NuGetLocatorTests 1✔️ 7✖️ 10ms
CSnakes.Runtime.Tests.Locators.PythonLocatorTests 6✔️ 10✖️ 25ms
CSnakes.Runtime.Tests.Python.ImmortalTests 5✔️ 326ms
CSnakes.Runtime.Tests.Python.ImportTests 3✔️ 257ms
CSnakes.Runtime.Tests.Python.PyDictionaryTests 6✔️ 223ms
CSnakes.Runtime.Tests.Python.PyObjectTests 45✔️ 2s
CSnakes.Runtime.Tests.ServiceCollectionTests 19✔️ 76ms

✔️ CSnakes.Runtime.Tests-macos-latest-3.13-net9.0.trx

137 tests were completed in 7s with 120 passed, 0 failed and 17 skipped.

Test suite Passed Failed Skipped Time
CSnakes.Runtime.Tests.Converter.BigIntegerConverterTest 1✔️ 50ms
CSnakes.Runtime.Tests.Converter.BoolConverterTest 2✔️ 85ms
CSnakes.Runtime.Tests.Converter.BytesConverterTest 2✔️ 74ms
CSnakes.Runtime.Tests.Converter.DictionaryConverterTest 1✔️ 50ms
CSnakes.Runtime.Tests.Converter.DoubleConverterTest 10✔️ 427ms
CSnakes.Runtime.Tests.Converter.ListConverterTest 1✔️ 39ms
CSnakes.Runtime.Tests.Converter.LongConverterTest 7✔️ 248ms
CSnakes.Runtime.Tests.Converter.TupleConverterTests 5✔️ 294ms
CSnakes.Runtime.Tests.Converter.UnicodeConverterTest 6✔️ 267ms
CSnakes.Runtime.Tests.Locators.NuGetLocatorTests 1✔️ 7✖️ 10ms
CSnakes.Runtime.Tests.Locators.PythonLocatorTests 6✔️ 10✖️ 12ms
CSnakes.Runtime.Tests.Python.ImmortalTests 5✔️ 516ms
CSnakes.Runtime.Tests.Python.ImportTests 3✔️ 197ms
CSnakes.Runtime.Tests.Python.PyDictionaryTests 6✔️ 274ms
CSnakes.Runtime.Tests.Python.PyObjectTests 45✔️ 2s
CSnakes.Runtime.Tests.ServiceCollectionTests 19✔️ 81ms

✔️ CSnakes.Tests-macos-latest-3.13-net8.0.trx

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

Test suite Passed Failed Skipped Time
CSnakes.Tests.CaseHelperTests 10✔️ 1ms
CSnakes.Tests.GeneratedSignatureTests 30✔️ 3s
CSnakes.Tests.PythonConstantTests+FloatTests 1✔️ 4ms
CSnakes.Tests.TokenizerTests 81✔️ 79ms
CSnakes.Tests.TypeReflectionTests 49✔️ 141ms

✔️ CSnakes.Tests-macos-latest-3.13-net9.0.trx

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

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

❌ Integration.Tests-macos-latest-3.13-net8.0.trx

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

Test suite Passed Failed Skipped Time
Integration.Tests.ArgsTests 6✔️ 22ms
Integration.Tests.BasicTests 9✔️ 63ms
Integration.Tests.BufferTests 27✔️ 1❌ 221ms
Integration.Tests.CustomTypesTests 1✔️ 3ms
Integration.Tests.DefaultsTests 7✔️ 3ms
Integration.Tests.ExceptionTests 2✔️ 5ms
Integration.Tests.FalseReturns 12✔️ 5ms
Integration.Tests.GeneratorTests 2✔️ 3ms
Integration.Tests.NoneTests 2✔️ 1ms
Integration.Tests.ReloadTests 3✔️ 5ms
Integration.Tests.TestDependency 1✔️ 151ms
Integration.Tests.TestDicts 5✔️ 5ms
Integration.Tests.TupleTests 17✔️ 61ms

❌ 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-macos-latest-3.13-net9.0.trx

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

Test suite Passed Failed Skipped Time
Integration.Tests.ArgsTests 6✔️ 15ms
Integration.Tests.BasicTests 9✔️ 46ms
Integration.Tests.BufferTests 31✔️ 1❌ 317ms
Integration.Tests.CustomTypesTests 1✔️ 3ms
Integration.Tests.DefaultsTests 7✔️ 2ms
Integration.Tests.ExceptionTests 2✔️ 5ms
Integration.Tests.FalseReturns 12✔️ 4ms
Integration.Tests.GeneratorTests 2✔️ 3ms
Integration.Tests.NoneTests 2✔️ 1ms
Integration.Tests.ReloadTests 3✔️ 6ms
Integration.Tests.TestDependency 1✔️ 111ms
Integration.Tests.TestDicts 5✔️ 4ms
Integration.Tests.TupleTests 17✔️ 35ms

❌ 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 macos-latest-3.13

Integration.Tests.BufferTests ► TestNonBuffer

Failed test found in:
  Integration.Tests-macos-latest-3.13-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 macos-latest-3.13

Integration.Tests.BufferTests ► TestNonBuffer

Failed test found in:
  Integration.Tests-macos-latest-3.13-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