8000 Object identity, Interfaces and Attributes by rmadsen-ks · Pull Request #2019 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Object identity, Interfaces and Attributes #2019

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

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' of github.com:pythonnet/pythonnet into 1776-Inh…
…eritGenericVirtualMethodFix2
  • Loading branch information
rmadsen-ks committed Nov 18, 2022
commit c290bf993fe372c85ba85c57cae75cecc448d99d
12 changes: 11 additions & 1 deletion tests/test_subclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from System.Threading import (CancellationToken)
import pytest
from Python.Test import (IInterfaceTest, SubClassTest, EventArgsTest,
FunctionsTest, GenericVirtualMethodTest, ISimpleInterface, SimpleClass, TestAttribute, TestAttributeAttribute, ISimpleInterface2)
FunctionsTest, GenericVirtualMethodTest, ISimpleInterface, SimpleClass, TestAttribute, TestAttributeAttribute, ISimpleInterface2, IGenericInterface)
import Python.Test
from System.Collections.Generic import List

Expand Down Expand Up @@ -500,3 +500,13 @@ def IncrementThing(self):
print(x.CallIncrementThing())



def test_generic_interface():
from System import Int32
from Python.Test import GenericInterfaceUser, SpecificInterfaceUser

GenericInterfaceImpl = interface_generic_class_fixture(test_generic_interface.__name__)

obj = GenericInterfaceImpl()
SpecificInterfaceUser(obj, Int32(0))
GenericInterfaceUser[Int32](obj, Int32(0))
You are viewing a condensed version of this merge commit. You can view the full changes here.
0