Skip to content

make all tests inherit from BaseTestClass #4858

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

Merged
merged 3 commits into from
Feb 20, 2020

Conversation

frank-dong-ms-zz
Copy link
Contributor

RT

.editorconfig Outdated
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
Copy link
Contributor

@sharwell sharwell Feb 19, 2020

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
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
Copy link
Contributor

@sharwell sharwell Feb 19, 2020

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

@@ -10,10 +10,13 @@
<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" />

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
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