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

Rule out test assemblies from versioning test sets #487

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh commented Sep 24, 2024

NOTE: Depends on

Issues addressed by this PR

Closes #486

Explicitly rule out any type or method from a Test_Toolkit assembly from being included in test sets.

Test files

Ensure no test_Toolkit method is part of the included methods/types

GenerateLegacyDataset.zip

Changelog

Additional comments

For now handled via a hard-coded list of assembly names. Happy for this to be changed to something smarter. Open for ideas @adecler @pawelbaran
@IsakNaslundBh IsakNaslundBh added the type:bug Error or unexpected behaviour label Sep 24, 2024
@IsakNaslundBh IsakNaslundBh self-assigned this Sep 24, 2024
@IsakNaslundBh
Copy link
Contributor Author

@adecler after doing this I had another thought. Could potentially make use of the IsPrototype method in the BHoM_Engine instead as that should filter out everything not part of the beta (if the beta is the last installer you ran). Might be worth a quick chat before I make that change, but might be a cleaner solution.

Copy link
Member

@pawelbaran pawelbaran left a comment

Choose a reason for hiding this comment

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

Makes sense in general, just one thought for an alternative: filtering by assembly method that would take:

  • a collection of types/methods
  • a collection of strings correspondent to assembly names
  • bool ignore vs include

...could be helpful in other places as well. But just a thought, please feel free to ignore 😉

/**** Private Fields ****/
/***************************************************/

private static HashSet<string> m_testToolkitAssemblyNames = new HashSet<string> { "CodeComplianceTest_Engine", "CodeComplianceTest_oM", "InteroperabilityTest_Engine", "InteroperabilityTest_oM", "NUnit_Engine", "NUnit_oM", "Test_Engine", "TestRunner", "UnitTest_Engine", "UnitTest_oM" };
Copy link
Member

Choose a reason for hiding this comment

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

I would consider splitting the collection with line breaks for readability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix issue with Test_Toolkit methods and objects being part of versioning testset
2 participants