nunit tests hold onto file handles after tests are done
"David Jeske" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks for NUnit. I'm new to using it, and I have a problem which seems so common it must be a FAQ, but I don't see it mentioned anywhere... I have a number of tests which run code that open and write to files. When my program exits it lets go of the filelocks just fine. However, when the tests run in Nunit GUI (and I keep the GUI up), the files are still locked, preventing me from inspecting their contents. Every time I run a set of tests I have to control-P to reload the project to force NUnit to flush the objects and cause the file locks to be released. This seems like such a common thing that I'm surprised there isn't an option "force full GC after testing" that would cause all the objects to be disposed. Am I doing something wrong? On a related note, those same tests need a nice way to create a temporary directory to write to, and delete the directory if the test passes but leave it if the test fails. Seems like this would be pretty common, but I couldn't find any methods or addons that do this. Am I looking in the wrong places? Thanks! (and thanks for nunit) - David ------------------------------------------------------------------------- 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