[py-dev] Speed of py.test compared to unittest

Eduardo "EdCrypt" O. Padoan eopadoan at altavix.com
Wed Nov 15 13:06:29 CET 2006


> I ran a test of a simple application that converts roman numeral to
> integer and vice versa (taken from Mike Pilgrim's
> http://diveintopython.org/ ).
> In a test that checks all 4999 possible numbers, unittest performs in
> about 125 mSeconds, while py.test takes about 3.8 seconds.  That's 30
> times slower.
> The unittest and py.test driven scripts perform the same tests.
I've tried to convert the Pilgrim's unittest examples to Py.test too,
and I think the performance using simple asserts inside loops was
acceptable. But using generative tests, I was tremendouly slow.

I you people think attachment is a bad idea, I can think of another
way to share the code I'm talking about.


-- 
EduardoOPadoan (eopadoan->altavix::com)
Bookmarks: http://del.icio.us/edcrypt
Blog: http://edcrypt.blogspot.com
Jabber: edcrypt at jabber dot org
ICQ: 161480283
GTalk: eduardo dot padoan at gmail dot com
MSN: eopadoan at altavix dot com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: romantest.py
Type: text/x-python
Size: 4536 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20061115/95613379/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: roman_test.py
Type: text/x-python
Size: 7212 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20061115/95613379/attachment-0001.py>


More information about the Pytest-dev mailing list