def test_neg_type_misc():
 global called
 clr.AddReference('IronPythonTest')
 import IronPythonTest.interop.net.type.clrtype as IPT
 from IronPython.Runtime.Types import PythonType
 called = False
 class MyType(type, ):
  def __clrtype__(self):
   global called
   called = True
   return IPT.NegativeEmpty
 class X(object, ):
  __metaclass__ = MyType
 a = X()
 AreEqual(clr.GetClrType(type(a)), clr.GetClrType(IPT.NegativeEmpty))
 class MyType(type, ):
  def __clrtype__(self):
   global called
   called = True
   return IPT.NegativeNoConstructor
 class X(object, ):
  __metaclass__ = MyType
 a = X()
 AreEqual(clr.GetClrType(type(a)), clr.GetClrType(int))

def test_neg_type_misc ( ) : global called clr . AddReference ( 'IronPythonTest' ) import IronPythonTest . interop . net . type . clrtype as IPT from IronPython . Runtime . Types import PythonType called = False class MyType ( type , ) : def __clrtype__ ( self ) : global called called = True return IPT . NegativeEmpty class X ( object , ) : __metaclass__ = MyType a = X ( ) AreEqual ( clr . GetClrType ( type ( a ) ) , clr . GetClrType ( IPT . NegativeEmpty ) ) class MyType ( type , ) : def __clrtype__ ( self ) : global called called = True return IPT . NegativeNoConstructor class X ( object , ) : __metaclass__ = MyType a = X ( ) AreEqual ( clr . GetClrType ( type ( a ) ) , clr . GetClrType ( int ) )
various scenarios in which the type returned by __clrtype__ is implemented purely in csharp or vb .