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

Core tests: safeguard against duplicate test markers #777

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 22, 2024

Description

This commit adds a test method to both the AbstractMethodUnitTest and the AbstractTokenizerTestCase classes to automatically verify that the case file in use by a child test class only contains unique test markers.

The actual logic for the test is in a custom, static, assertion assertTestMarkersAreUnique() to allow for calling the assertion directly if an additional test case file is tokenized for the test; and to prevent duplicating the logic in both test case classes.

Includes fixing a few test markers which this new test identified as duplicates straight off.

Suggested changelog entry

Changed: the AbstractMethodUnitTest and the AbstractTokenizerTestCase will now flag duplicate test case markers in a test case file.

Related issues/external references

Fixes #773

@jrfnl jrfnl added this to the 3.11.3 milestone Dec 22, 2024
@jrfnl jrfnl force-pushed the feature/773-safeguard-against-duplicate-test-markers branch from 4e80b5d to 8169944 Compare December 22, 2024 13:45
This commit adds a new test to both the `AbstractMethodUnitTest` and the `AbstractTokenizerTestCase` classes to automatically verify that the case file in use by the child test class only contains unique test markers.

The actual logic for the test is in a custom, `static`, assertion `assertTestMarkersAreUnique()` to allow for calling the assertion directly if an additional test case file is tokenized for the test; and to prevent duplicating the logic in both test case classes.

Includes fixing a few test markers which this new test identified as duplicates straight off.

Fixes 773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core Tests: have a check for duplicate markers in inc files
1 participant