mahmoudimus / nose-timer

A timer plugin for nosetests (how much time does every test take?)
MIT License
126 stars 33 forks source link

Nose Timer doesn't work with multiprocess #31

Closed rsnyman closed 10 years ago

rsnyman commented 10 years ago

In order to run my tests faster, I use the multiprocess module and run my tests in parallel, like so:

$ nosetests ... --processes=4

When I try to run my tests with Nose Timer, I don't see any timer results:

$ nosetests ... --processes=4 --with-timer

It works fine when I drop "--processes=4"

e0ne commented 10 years ago

Confirmed. @whodafly thanks a lot! I'm planning to fix it asap

rsnyman commented 10 years ago

@e0ne that would be awesome, thank you!

skudriashev commented 10 years ago

Please, take a look at https://github.com/mahmoudimus/nose-timer/pull/42. Thanks!

skudriashev commented 10 years ago

Even though this PR fixes the issue, I saw that many plugins are just not compatible with the multiprocess plugin. Moreover this fix works only on main python versions such as py26, py27 and py33. So we need to think if we want to support compatibility with multiprocess by this way.

What do you think, guys?

rsnyman commented 10 years ago

I can confirm that #42 fixes my problem. Thanks guys!

mahmoudimus commented 10 years ago

Fixed by #42

ewyler commented 8 years ago

FYI it appears this functionality was broken by https://github.com/mahmoudimus/nose-timer/commit/dd1b9418517d75c21b9213101789cb33a76749c0. There are test timings printed, but they're wrong and aren't printed until after all the tests have run.

mahmoudimus commented 8 years ago

@ewyler how are you running your tests? can you share more about your operating system, python version, and how you're executing your tests?

ewyler commented 8 years ago

Yup! OS is Ubuntu 14.04.3 LTS, Python 2.7.6, the tests are being executed by running a command as specified at the start of this issue. Adding --processes=(anything) to the command causes the timings to be at the end and screwed up. If I remove that, it all works great. I switched us back to using 0.4.4 in the meantime as that still works.

mahmoudimus commented 8 years ago

@ewyler so this is for the 0.5.0 release? Ok, thanks. I will link this report w/ #68

ewyler commented 8 years ago

Yes, 0.5.0, should've included the version. Thanks, appreciate the prompt response