-
Notifications
You must be signed in to change notification settings - Fork 261
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
Allow to disable test expansion on implementations of ITestDataSource #4269
Conversation
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.
Copilot reviewed 5 out of 10 changed files in this pull request and generated 1 suggestion.
Files not reviewed (5)
- src/TestFramework/TestFramework/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
- src/TestFramework/TestFramework/Attributes/DataSource/DataRowAttribute.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Attributes/DataSource/DynamicDataAttribute.cs: Evaluated as low risk
- test/IntegrationTests/TestAssets/FxExtensibilityTestProject/TestDataSourceExTests.cs: Evaluated as low risk
- src/Adapter/MSTest.TestAdapter/Discovery/AssemblyEnumerator.cs: Evaluated as low risk
Comments skipped due to low confidence (1)
src/TestFramework/TestFramework/Attributes/DataSource/TestDataSourceDiscoveryAttribute.cs:31
- [nitpick] The parameter name 'expandDataSource' is ambiguous. It should be renamed to 'shouldExpandDataSource' or 'isExpandDataSourceEnabled' to clearly indicate its boolean nature.
public TestDataSourceDiscoveryAttribute(bool expandDataSource)
test/IntegrationTests/MSTest.IntegrationTests/Parameterized tests/DataExtensibilityTests.cs
Show resolved
Hide resolved
There are issues with DataRow currently. If you do this: [DataRow(new object[] { (byte)0 })]
[DataRow(new object[] { (short)0 })] the types byte and short are lost IIRC and you end up with int. This happens even though we have:
(on .NET runtime, this behavior is by-design I think - there is something around primitive types specifically there) |
src/TestFramework/TestFramework/Attributes/DataSource/DynamicDataAttribute.cs
Outdated
Show resolved
Hide 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.
Copilot reviewed 5 out of 17 changed files in this pull request and generated no suggestions.
Files not reviewed (12)
- src/TestFramework/TestFramework/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
- src/Adapter/MSTest.TestAdapter/Discovery/AssemblyEnumerator.cs: Evaluated as low risk
- src/Adapter/MSTest.TestAdapter/Discovery/TypeEnumerator.cs: Evaluated as low risk
- src/Adapter/MSTest.TestAdapter/Execution/TypeCache.cs: Evaluated as low risk
- src/Adapter/MSTest.TestAdapter/Helpers/ReflectHelper.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Attributes/DataSource/DataRowAttribute.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Attributes/DataSource/DynamicDataAttribute.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Attributes/DataSource/TestDataSourceDiscoveryAttribute.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Attributes/DataSource/TestDataSourceDiscoveryOption.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Attributes/DataSource/TestDataSourceOptionsAttribute.cs: Evaluated as low risk
- src/TestFramework/TestFramework/Interfaces/ITestDataSourceUnfoldingCapability.cs: Evaluated as low risk
- test/IntegrationTests/MSTest.IntegrationTests/Parameterized tests/DataExtensibilityTests.cs: Evaluated as low risk
Comments skipped due to low confidence (1)
test/IntegrationTests/TestAssets/DynamicDataTestProject/DisableExpansionTests.cs:36
- [nitpick] The method name 'TestPropertyWithTwoSourcesButOnlyOneDisablingExpansion' is quite long and could be more concise.
[DynamicData(nameof(PropertySource), UnfoldingStrategy = TestDataSourceUnfoldingStrategy.Fold)]
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
src/TestFramework/TestFramework/Interfaces/ITestDataSourceUnfoldingCapability.cs
Outdated
Show resolved
Hide resolved
test/IntegrationTests/TestAssets/DynamicDataTestProject/DisableExpansionTests.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Interfaces/ITestDataSourceUnfoldingCapability.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # src/Adapter/MSTest.TestAdapter/Discovery/AssemblyEnumerator.cs
Fixes #4255
Note that I decided to not allow
[DataRow]
to disable test expansion because AFAIK we don't have issue there but that's arbitrary call and I don't mind changing it.