To add a new test you can modify the %DLR_Root%\Test\IronPython.tests file and
add something like:
<Test>
<Name>test_csv_cpy</Name>
<Filename>%DLR_ROOT%\Languages\IronPython\Internal\ipy.bat</Filename>
<Arguments> Test\test_csv.py</Arguments>
<MaxDuration>600000</MaxDuration>
<LongRunning>false</LongRunning>
<Disabled>false</Disabled>
<RequiresAdmin>false</RequiresAdmin>
<NotParallelSafe>false</NotParallelSafe>
<WorkingDirectory>%DLR_ROOT%\External.LCA_RESTRICTED\Languages\IronPython\27\Lib</WorkingDirectory>
</Test>
The test runner will then include running those tests.
If you want to add new tests beyond what CPython has you could either add them
directly to CPython's test_csv.py or you could create a new test_csv.py in
%DLR_ROOT%\Languages\IronPython\Tests. If you put them in CPython's test_csv I
would suggest adding a comment which says it's an additional test as well as
submitting the test back to CPython. The comment is just there so we know
what's going on whenever the next merge from CPython has to happen.
We don't have to stick to this test runner BTW - it was just an easy way to
export what we were running in our internal gated checkin system which we
couldn't publish. We could export the data to something else or we could
update it to something more Linux and OS/X friendly (as they probably don't
have cmd.exe to run bat files :)).
From: [email protected]
[mailto:[email protected]] On Behalf Of Slide
Sent: Monday, January 10, 2011 6:42 PM
To: Discussion of IronPython
Subject: [IronPython] Adding Unit Tests
As I am developing an implementation of the _csv module that I would eventually
like to contribute to the community, what is the best way to add unit tests to
the current suite? I have been using the unit test in the CPython sources for
the csv module to test my _csv implementation. Is there an easy way to
incorporate that into the current unit test setup?
Thanks,
slide
--
slide-o-blog
http://slide-o-blog.blogspot.com/
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com