-
Notifications
You must be signed in to change notification settings - Fork 115
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
after() function is not called when test fails. #200
Comments
I released a new version of canopy this morning which should address this |
I've checked the repository but it seems the change #197 is not merged into the master branch. |
You are right, I forgot to merge the pull request, I just did that and when I get home tonight I will do another build and let you know. |
Thank you |
https://www.nuget.org/packages/canopy/0.9.26 That has the change in it. |
It would be nicer to have these before/after/once/lastly to work across all the tests and not just the very first context (same as TextFixtureSetup / TextFixtureTeardown / Setup / Teardown in unit test frameworks. |
You want them to not be context specific? |
That's what I suggest - across all tests (once for the very first test, lastly for the very end test, before/after for all tests). Here is an example why they would be useful:
|
Its like that, but its all tests within a context. If you want to have some nice common code so that you don't have to redefine the same boring once/before/after/lastly for each context I can show you how to do that. Just take a few minutes. |
Also context specific ones could be useful, but these should be defined inside the context itself; not the global level. |
This gist shows: https://gist.github.com/lefthandedgoat/006f9282e53b9ab29f6e F# runs the most recently defined version of a function, so by providing a new version of Does this help accomplish what you want? |
Yes, that's wonderful. Thank you. |
You are welcome, enjoy! |
The test cleanup function after() is not called when a test fails. I think, it should be called regardless.
The text was updated successfully, but these errors were encountered: