[py-dev] Speed of py.test compared to unittest
Pierre Rouleau
prouleau001 at gmail.com
Tue Nov 14 20:52:11 CET 2006
Hi all!
I'v just started looking into py.test. I really like it: it's easier
to use and requires less boiler plate code than unittest. Thanks!
However, i found that it runs much slower than unittest (at least
under some conditions). I was expecting a slowdown because of
py.test's nature, but I get results that are 10 to 30 times slower.
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.
Is this what I should expect?
I am running Python 2.4.3 on Win32 machine with py-dist revision 34574
(the latest) from svn.
Thanks,
Pierre Rouleau
More information about the py-dev
mailing list