Re: nunit tests hold onto file handles aftertestsaredone
"David Jeske" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 23, 2008 at 4:41 PM, Charlie Poole <[email protected]> wrote: > As I said, we may have the info you need available to do this in the next > release. That said, I think a better approach would be to give the tests two > different teardowns: one to cleanup after success, the other > after failure. > This would be a reasonable solution. It would also be fine if teardown had a (bool testPassed) paramater. However, even that approach has a problem. If a single test fails and you > fail to clean up > after it, it's likely that subsequent tests won't run correctly. > I don't have any problems with a new test not running correctly because something wasn't cleaned up, because I run every test in a unique directory name to assure it doesn't collide with any other test. However, this means the beginning of my test methods all have to include the testname again in the directory create. I don't like having to double-datakeep. I'm thinking I'll just switch to using a reflection stackwalk to get the current method name. http://www.codeproject.com/KB/dotnet/MethodName.aspx ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users