Skip to content

make all tests inherit from BaseTestClass - #4858

Merged
frank-dong-ms-zz merged 3 commits into
dotnet:masterfrom
frank-dong-ms-zz:basetestclass
Feb 20, 2020
Merged

make all tests inherit from BaseTestClass#4858
frank-dong-ms-zz merged 3 commits into
dotnet:masterfrom
frank-dong-ms-zz:basetestclass

Conversation

@frank-dong-ms-zz

Copy link
Copy Markdown
Contributor

RT

Comment thread .editorconfig
Comment on lines -24 to -27
[test/Microsoft.ML.CodeAnalyzer.Tests/**.cs]
# BaseTestClass does not apply for analyzer testing.
# MSML_ExtendBaseTestClass: Test classes should be derived from BaseTestClass
dotnet_diagnostic.MSML_ExtendBaseTestClass.severity = none

@sharwell sharwell Feb 19, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 This one shouldn't change #Resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right, thanks


In reply to: 381542429 [](ancestors = 381542429)

namespace Microsoft.ML.CodeAnalyzer.Tests.Code
{
public class BaseTestClassTest
public class BaseTestClassTest : BaseTestClass

@sharwell sharwell Feb 19, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 This project shouldn't change as part of the rest of the work. #Resolved

<ProjectReference Include="..\..\src\Microsoft.ML.Transforms\Microsoft.ML.Transforms.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFrameworkCommon\Microsoft.ML.TestFrameworkCommon.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TestFramework [](start = 47, length = 13)

There was a change recently to move some functionality out of Microsoft.ML.TestFramework and into a separate project Microsoft.ML.TestFrameworkCommon. I don't remember what was the reason for this change (I think it had something to do with the nightly build test project).
Anyway, if all test classes need to inherit from BaseTestClass, shouldn't we move that class to Microsoft.ML.TestFrameworkCommon?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BaseTestClass has reference to this Contracts which is internal class of Microsoft.ML.Core and referenced by TestFramework by bestfriend.
I don't know why this Contracts class is in src folder not test folder but that can be a different issue.


In reply to: 381876287 [](ancestors = 381876287)

@frank-dong-ms-zz
frank-dong-ms-zz merged commit b34c3b6 into dotnet:master Feb 20, 2020
@frank-dong-ms-zz
frank-dong-ms-zz deleted the basetestclass branch April 15, 2020 20:36
@ghost ghost locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants