Skip to content

Conversation

@AmeyaVS
Copy link
Contributor

@AmeyaVS AmeyaVS commented Feb 10, 2025

Adding initial support for pytest DISCOVERY_EXTRA_ARGS as discussed in #53 .

Refer comment: #53 (comment) for additional context.

Let me know if additional changes are needed.

Note:
I have kept the implementation minimal.
I am of the opinion that handling complex user scenarios which might break test discovery should be an onus on the user.
If they break it they should resolve the issue themselves.

Copy link
Collaborator

@buddly27 buddly27 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, this looks great! I'll make a few adjustments to the tests and doc before merging.

@buddly27
Copy link
Collaborator

Oh also, the DISCOVERY_EXTRA_ARGS should be added to the EXTRA_ARGS list when BUNDLE_TESTS is enabled. Otherwise, filtering options would be lost.

- Ensure that discovery arguments are passed when using BUNDLE_TESTS
  option;
- Update unit tests;
- Update documentation.
@buddly27 buddly27 merged commit 22e8256 into python-cmake:main Feb 17, 2025
72 checks passed
@AmeyaVS AmeyaVS deleted the add-discover-extra-args branch February 18, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants