Allow running tests directly#2279
Merged
CharliePoole merged 1 commit intomasterfrom Jun 26, 2017
Merged
Conversation
Member
Author
|
Unrelated timing error in travis-ci/pr run. Restarted. |
jnm2
approved these changes
Jun 26, 2017
JoostK
added a commit
to JoostK/nunit
that referenced
this pull request
Feb 6, 2026
…lable The implicit availability of `AdhocContext` since nunit#2279 has made the fallback branches dead code, causing the text to be written into the ad-hoc test result which is never written anywhere. This commit restores the original intent of `TextCapture` by detecting this situation and redirecting the write into the default writer. Fixes nunit#5120
JoostK
added a commit
to JoostK/nunit
that referenced
this pull request
Feb 6, 2026
…lable The implicit availability of `AdhocContext` since nunit#2279 has made the fallback branches dead code, causing the text to be written into the ad-hoc test result which is never written anywhere. This commit restores the original intent of `TextCapture` by detecting this situation and redirecting the write into the default writer. Fixes nunit#5120
stevenaw
pushed a commit
that referenced
this pull request
Feb 16, 2026
…lable The implicit availability of `AdhocContext` since #2279 has made the fallback branches dead code, causing the text to be written into the ad-hoc test result which is never written anywhere. This commit restores the original intent of `TextCapture` by detecting this situation and redirecting the write into the default writer. Fixes #5120
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2242
This PR goes back to the pre-3.7 approach of creating a new TestExecutionContext when the current context is null. However, it uses a special adhoc context, that sets up non-null values in several members to avoid null reference exceptions.
This is not intended as a general fix to allow running tests directly. The executing program has no way to find out about warnings or multiple assertion failures and there is no intention to support those new features. This merely keeps things that worked before working for the user.