Re: [IronPython] NUnit with IronPython

2005-12-08 Thread J. Merrill
Isn't the source for NUnit available?  If it is, perhaps it would make sense to 
modify it to support use of a naming convention, rather than .Net attributes, 
to determine which classes should be treated as being TestFixtures and which 
methods are Test methods.  (For example, any classes with NUnitTestFixture in 
the name, and methods with NUnitTest in the name, could be so treated.)

This would be in line with the "convention vs configuration" idea popularized, 
AFAIK, by Rails.

Just a thought...

At 11:04 AM 12/8/2005, Giles Thomas wrote
>Thanks, Martin.  I guess this means we can't use NUnit for now.
>
>Regards,
>
>Giles


J. Merrill / Analytical Software Corp

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Stefan Rusek
Yeah, I wrote a codedom library for ironpython, and had it working with
asp.net and everything only to realized that the dll that IP compiles is
almost useless for asp.net in the current form.

 

--Stefan

 

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith J. Farmer
Sent: Thursday, December 08, 2005 2:10 PM
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

 

Having stable names would be useful outside of unit testing, though, and
more attractive in the long run.

 

  _  

From: [EMAIL PROTECTED] on behalf of Aidan Downes
Sent: Thu 12/8/2005 11:56 AM
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

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

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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?

<>___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Keith J. Farmer
Having stable names would be useful outside of unit testing, though, and more 
attractive in the long run.



From: [EMAIL PROTECTED] on behalf of Aidan Downes
Sent: Thu 12/8/2005 11:56 AM
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython



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

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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?



<>___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Aidan Downes
Doesn't python have its own nunit variant? Pyunit I think. Probably
easier to port that over to ironpython.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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: $maker 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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]
>> 
>>
>>
>>
>
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>  
>

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Keith J. Farmer
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 // [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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: $maker 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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]
>> 
>>
>>
>>
>
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>  
>

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Martin Maly
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: $maker 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]
>> 
>>
>>
>>
>
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>  
>

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread William Reade
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]
>> 
>>
>>
>>
>
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>___
>users mailing list
>users@lists.ironpython.com
>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>  
>

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Martin Maly
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]
>  
>

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread William Reade
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]
>  
>

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Martin Maly
This is, sadly, true. IronPython will not preserve the name of the method as we 
know it...

Martin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 // [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Giles Thomas
Sent: Thursday, 08 December 2005 08:04
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

Thanks, Martin.  I guess this means we can't use NUnit for now.

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Keith J. Farmer
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 // [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Giles Thomas
Sent: Thursday, 08 December 2005 08:04
To: Discussion of IronPython
Subject: Re: [IronPython] NUnit with IronPython

Thanks, Martin.  I guess this means we can't use NUnit for now.

___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Giles Thomas
Thanks, Martin.  I guess this means we can't use NUnit for now.


Regards,

Giles

Martin Maly wrote:
> .NET Attributes on classes/methods are something we yet have to find the 
> right answer to. At this point, there is not a way to put attributes on the 
> classes/methods/... that IronPython generates.
> 
> Martin
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Giles Thomas
> Sent: Thursday, December 08, 2005 3:32 AM
> To: Discussion of IronPython
> Subject: [IronPython] NUnit with IronPython
> 
> Hi,
> 
> Has anyone got IronPython to work with NUnit?  The thing that's blocking 
> me is how to associate the "TestFixture" attribute with the class and 
> the "Test" attribute with the methods.
> 
> I suspect I may be missing something fundamental...
> 
> 
> Regards,
> 
> Giles
> ___
> users mailing list
> users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> ___
> users mailing list
> users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] NUnit with IronPython

2005-12-08 Thread Martin Maly
.NET Attributes on classes/methods are something we yet have to find the right 
answer to. At this point, there is not a way to put attributes on the 
classes/methods/... that IronPython generates.

Martin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Giles Thomas
Sent: Thursday, December 08, 2005 3:32 AM
To: Discussion of IronPython
Subject: [IronPython] NUnit with IronPython

Hi,

Has anyone got IronPython to work with NUnit?  The thing that's blocking 
me is how to associate the "TestFixture" attribute with the class and 
the "Test" attribute with the methods.

I suspect I may be missing something fundamental...


Regards,

Giles
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] NUnit with IronPython

2005-12-08 Thread Giles Thomas
Hi,

Has anyone got IronPython to work with NUnit?  The thing that's blocking 
me is how to associate the "TestFixture" attribute with the class and 
the "Test" attribute with the methods.

I suspect I may be missing something fundamental...


Regards,

Giles
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com