def test_type_constructor_overloads():
 global called
 import clr
 clr.AddReference('IronPythonTest')
 import IronPythonTest.interop.net.type.clrtype as IPT
 called = False
 class MyType(type, ):
  def __clrtype__(self):
   global called
   called = True
   return IPT.SanityConstructorOverloads
 class X(object, ):
  __metaclass__ = MyType
  def __init__(self, *args, **kwargs):
   pass
 AreEqual(called, True)
 temp = X()
 Assert(str(temp).startswith('<first'), str(temp))

def test_type_constructor_overloads ( ) : global called import clr clr . AddReference ( 'IronPythonTest' ) import IronPythonTest . interop . net . type . clrtype as IPT called = False class MyType ( type , ) : def __clrtype__ ( self ) : global called called = True return IPT . SanityConstructorOverloads class X ( object , ) : __metaclass__ = MyType def __init__ ( self , * args , ** kwargs ) : pass AreEqual ( called , True ) temp = X ( ) Assert ( str ( temp ) . startswith ( '<first' ) , str ( temp ) )
a type containing multiple constructors with a pythontype as the first parameter should work .