-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
make all tests inherit from BaseTestClass #4858
Conversation
.editorconfig
Outdated
[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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
namespace Microsoft.ML.CodeAnalyzer.Tests.Code | ||
{ | ||
public class BaseTestClassTest | ||
public class BaseTestClassTest : BaseTestClass |
There was a problem hiding this comment.
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" /> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
RT