[IronPython] NUnit with IronPython

Aidan Downes aidand at microsoft.com
Thu Dec 8 20:56:42 CET 2005


Doesn't python have its own nunit variant? Pyunit I think. Probably
easier to port that over to ironpython.

-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer
Sent: Thursday, December 08, 2005 11:06 AM
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

Assuming IP is going for the .NET producer route, what's the tact for
exposing CLR classes with CLR methods?  EG, would there be a 'fixed' (as
in 'non-dynamic') form of method and field which won't mangle the name,
allowing it to be exposed?

-----
Keith J. Farmer // kfarmer at thuban.org

-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly
Sent: Thursday, 08 December 2005 10:56
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

Name mangling for classes is not complicated. What makes it harder is
not the naming, it is the way the classes are compiled. Class gets
generated as a static function named: <class name>$maker<integer> that
creates the class (the type) at runtime.

Other than source code and exploration of generated binaries using
ildasm or reflector, we don't currently have documentation on this,
unfortunately.

Martin


-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade
Sent: Thursday, December 08, 2005 10:38 AM
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

Sadly, NUnit won't run static methods, so that won't work, but thank you
anyway.

Are class names similarly mangled? If there's any documentation on this,
I'd really appreciate a pointer to it, as I haven't been able to find
much help elsewhere... or is it just a matter of hunting through the
source?

William

Martin Maly wrote:

>IronPython mangles names. For example:
>
>def method():
>    return 1
>
>Produces:
>
>public static object method$f0()
>
>The test_prefix would get therefore preserved so on a second thought,
this may work, provided that nunit executes public static methods and
doesn't require specific return value. Ours is always "object" in this
case.
>
>Martin
>
>
>-----Original Message-----
>From: users-bounces at lists.ironpython.com
>[mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade
>Sent: Thursday, December 08, 2005 10:02 AM
>To: Discussion of IronPython
>Subject: Re: [IronPython] NUnit with IronPython
>
>Does this mean that IronPython will emit methods, but their names will
be mangled, or that it simply won't produce anything that can be
effectively used from outside?
>
>William
>
>Martin Maly wrote:
>
>  
>
>>This is, sadly, true. IronPython will not preserve the name of the
method as we know it...
>>
>>Martin
>>
>>-----Original Message-----
>>From: users-bounces at lists.ironpython.com
>>[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. 
>>Farmer
>>Sent: Thursday, December 08, 2005 9:46 AM
>>To: Discussion of IronPython
>>Subject: Re: [IronPython] NUnit with IronPython
>>
>>For backwards compatibility, NUnit would also accept method names
beginning with "test" ("test_" ?).  However, I don't think IP emits
methods as we know them yet?
>>
>>-----
>>Keith J. Farmer // kfarmer at thuban.org
>> 
>>
>>    
>>
>
>_______________________________________________
>users mailing list
>users at lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>_______________________________________________
>users mailing list
>users at lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>  
>

_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-ironpython.com



More information about the Ironpython-users mailing list