Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tearDown() not called between reruns #39

Closed
yaro90 opened this issue Apr 24, 2015 · 2 comments · Fixed by #41
Closed

tearDown() not called between reruns #39

yaro90 opened this issue Apr 24, 2015 · 2 comments · Fixed by #41

Comments

@yaro90
Copy link

yaro90 commented Apr 24, 2015

Hi,

Thanks for what seems to be a very promising idea...
I tried to use flaky with nosetests, however I find that the tests are rerun for fails fine but the tearDown() does not get called between reruns until the very end when all reruns are finished, which is not good the test can leave something behind on the environment. Is this how flaky was designed or is it an actual issue?

Thanks,
Regards,
Yaro

@Jeff-Meadows
Copy link
Contributor

Hi Yaro - good question.

Unfortunately, nosetests plugins can only use a certain number of entry points, and the one to handle a test failure or error is called before test tearDown().

However, I think it's possible to modify flaky to run tearDown after each test, pass or fail. I'll see what I can come up with.

@yaro90
Copy link
Author

yaro90 commented Apr 27, 2015

Thanks Jeff, much appreciated.
So you are saying that this happens due to the nature of nosetests not calling tearDown() until the test is marked as passed or failed (which of course is not done between test re-runs by flaky), but its possible to overcome this through modification to flaky or perhaps I misunderstood your comment?

Regards,
Yaro

Jeff-Meadows added a commit to Jeff-Meadows/flaky that referenced this issue May 1, 2015
Fixes box#39.
Instead of rerunning a test as soon as it's identified as flaky and a failure, wait until after tearDown is called.
Only applies to the nose plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants