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
Nested AssertionScopes do not print inner scope reportables #1829
Comments
Thanks for reporting this. |
I'd like to tackle this if it's up for grabs. I think the most straightforward approach would be to have the inner scope yield its reportables to the "parent" when disposed, as is done with failure messages. There is a potential conflict here if inner and outer scopes attempt to use the same key though, as well as a few other cases - only the final value for a given key would be reported. I'm note entirely sure what the most appropriate behaviour should be. |
I think that's an acceptable solution. We just need to make sure that |
Unfortunately I've not been able to dedicate much time to this. For anyone else wishing to pick it up, |
Me and my friend Ruijin92 are two new Contributors working together on Issues and having our first experience in an open source project. |
…er to outer scope Fixed typo
Description
Nested AssertionScopes only report the outer-most scope reportables on failure. This is true regardless of whether the outer scope has any reportables -- i.e., if only the inner scope has reportables, nothing is reported.
Complete minimal example reproducing the issue
Expected behavior:
Message:
Expected testVal to be 1, but found 2.
Actual behavior:
Message:
Expected testVal to be 1, but found 2.
Versions
6.5.1
.NET Framework 4.7.2
Additional Information
using Microsoft.VisualStudio.TestTools.UnitTesting test framework
The text was updated successfully, but these errors were encountered: