Error in doc: OneTimeTearDown is run even if OneTimeSetUp failed
The page https://github.com/nunit/docs/wiki/OneTimeTearDown-Attribute contains the line:
So long as any OneTimeSetUp method runs without error, the OneTimeTearDown method is guaranteed to run. It will not run if a OneTimeSetUp method fails or throws an exception.
It should be removed because:
- it is wrong (I tested with NUnit 3.7.1)
- it contradicts the page https://github.com/nunit/docs/wiki/SetUp-and-TearDown-Changes that says:
Assume that an exception is thrown in BaseSetUp. In NUnit 2.6, methods would be executed as follows: BaseSetUp, DerivedTearDown, BaseTearDown In NUnit 3.0, execution will proceed as follows: BaseSetUp, BaseTearDown
Correct, that doc page describes what happens inNUnitV2. However, somebody should check whether the changes outlined in the second quoted page were fully implemented. I can't remember.
These pages still contradict each other
I see my comment in 2018 may not have been understood.
The second citation describes how we want NUnit to work. Someone needs to ascertain if it works that way. If it is not working, then it's the code that needs fixing, not the comment. The first citation would tnen need correcting to match the correct behavior.
IOW, I don't think we should change the docs to match incorrect behavior in the framework.
Perhaps this should have been moved to be a framework issue rather than a documentation issue.
After some simple tests it seems https://docs.nunit.org/articles/nunit/writing-tests/setup-teardown/SetUp-and-TearDown-Changes.html correctly describes the behavior of nunit.
I put in a PR that simply deletes the incorrect line. If more detail is wanted, one of the @nunit/framework-team members should probably do that.