Skip to content
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

Add class/assembly cleanup/init messages to first/last test #1390

Merged

Conversation

engyebrahim
Copy link
Member

fix: #1340

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Could you please review the test caseInheritClassWithCleanupInheritanceBehaviorNone_ParentTestMethod where the order of calls changed?

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is something fishy with the implementation (maybe how you find the test to attach cleanup results to) because it seems that the ClassCleanup.InheritanceBehaviorBeforeEachDerivedClass messages are not attached to the correct test.

@@ -183,14 +183,14 @@ internal TestResult ToTestResult(TestCase testCase, DateTimeOffset startTime, Da

if (!StringEx.IsNullOrEmpty(DebugTrace))
{
string debugTraceMessagesInStdOut = string.Format(CultureInfo.InvariantCulture, "\n\n{0}\n{1}", Resource.DebugTraceBanner, DebugTrace);
string debugTraceMessagesInStdOut = string.Format(CultureInfo.CurrentCulture, "{2}{2}{0}{2}{1}", Resource.DebugTraceBanner, DebugTrace, Environment.NewLine);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use OS line return to avoid mixing line return kinds.

@Evangelink Evangelink self-requested a review November 23, 2022 22:18
Evangelink
Evangelink previously approved these changes Nov 23, 2022
@Evangelink Evangelink merged commit 31f86eb into microsoft:main Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assembly and class cleanup and init TestContext.WriteLine() don't appear in any place.
2 participants