On 11/15/06, Maciek Fijalkowski <[EMAIL PROTECTED]> wrote: > >> > >> I've profiled it a bit. Right now (for me) your tests are about 3x > >> slower that unittests. It still can be improved somehow. > >> > >> Btw: Tests are unfair, cause collection encounters 5k tests for py.test > >> and 13 for unittests, if you rewrite it so they'll be equal it would be > >> better. It's not good excuse anyway ;-) > >> > >> I'll try to work a bit more on it, but I guess achieving 2x in this > >> particular case would be enough. If you still encounter massive > >> slowdowns in different enviroments, do not hesitate to contact us. > >> > > True, the code I sent you is not comparing the exact same tests and it > > is unfair. > > So, as I kept looking into unit test for Python, I found nose and its > > nosetests that essentially does the same as py.test (without having > > the same design goals as the Py lib). I ran the same test on both > > tools. > > > > The results are: > > - py.test tests in [4.30s, 4.17s, 4.28s, 4.42s] > > - nosetests tests in [ 1.48s, 1.43s, 1.40s, 1.50s] > > > > So it looks like achieving a 2x would make it run in the same ballpark > > as nosetests (at least for that code). > > > > I do like py.test error report better than nosetest though. The > > reporting is less verbose. > >
> > Btw: it's updated version? (I did some improvements today/yesterday) > No! I re-ran the tests with your latest version and I got faster results! Great! The results are now: [ 1.94s, 1.92s, 1.92s, 1.98s, 1.92s] which is much closer to the nosetest results. Note however, that when I run nosetests, it executes the *exact* same test, which means that the test file (test_roman.py) contains: from py.test import raises and it uses the raises() call to check that exceptions are raised. I am currently looking into nose to see how i could replace the py.test.raises with nose equivalent. Cheers, P.R. _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev