[IronPython] Unittest Module Unavailable in V2.7a1
Michael Foord
fuzzyman at voidspace.org.uk
Mon Aug 30 17:35:40 CEST 2010
On 30/08/2010 18:32, Jones, Larry wrote:
>
> Thanks, Michael, for the information. I copied the file unittest.py
> from my IronPython 2.6 installation to my IronPython 2.7 installation.
>
> It did seem to work, although discovering that in 2.7 unittest is a
> directory containing a number of other files, was a bit disconcerting.
> I renamed the v2.7 unittest directory (to unittest.000) and then
> copied unittest.py from the IronPython 2.6 installation.
>
> I greatly appreciate your help on this.
>
In Python 2.6 unittest was a single file (unittest.py). In Python 2.7 it
is a package (a directory containing several modules). The unittest
package in Python 2.7 is a lot more capable, but using the Python 2.6
version of unittest.py will certainly work.
All the best,
Michael Foord
> *From:* users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Michael Foord
> *Sent:* Monday, August 30, 2010 9:33 AM
> *To:* Discussion of IronPython
> *Subject:* Re: [IronPython] Unittest Module Unavailable in V2.7a1
>
> On 30/08/2010 16:38, Jones, Larry wrote:
>
> My team is currently using VS2010 for work. I want to demonstrate that
> using IronPython as our "unit testing language" can be more productive
> than using either NUnit or Microsoft Test.
>
> In order to integrate with VS2010, I believe I must use IronPython
> 2.7a1. I believe this is the only release that includes the IronPython
> Tools. However, IronPython 2.7a1 fails when executing 'import
> unittest'. I've submitted a work item, 28709, to the IronPython issue
> tracker; however, I'm wondering if another work around exists then
> writing code in 2.6.1 -- which will execute outside VS2010 -- but
> cannot be executed from within Visual Studio (it invoke IronPython 2.7a1).
>
>
> The IronPython team is aware of this problem, it was caused by a 'bug'
> in the tools that package the installer.
>
> A simple workaround (that will probably work) is to copy the unittest
> package from a CPython 2.7 installation into your IronPython Lib
> directory. In IronPython 2.7 the unittest package is missing some files.
>
> All the best,
>
> Michael Foord
>
>
>
>
> Thanks.
>
> Have a great day!
>
>
> ******************************************************************
> This e-mail and any attachments are intended only for use by the
> addressee(s) named herein and may contain legally privileged and/or
> confidential information. If you are not the intended recipient of
> this e-mail, you are hereby notified any dissemination, distribution
> or copying of this email, and any attachments thereto, is strictly
> prohibited. If you receive this email in error please immediately
> notify the sender and permanently delete the original copy and any
> copy of any e-mail, and any printout thereof.
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com <mailto:Users at lists.ironpython.com>
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
>
> --
> http://www.ironpythoninaction.com/
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100830/de7d38ae/attachment.html>
More information about the Ironpython-users
mailing list