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

Remove empty files from a subset request #46

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Conversation

shuheiktgw
Copy link
Contributor

@shuheiktgw shuheiktgw commented Jul 15, 2021

The current implementation sends contains test files to the subset endpoint even if it does not contain any tests. This is problematic especially when a user uses wantFunction/wantMethod interfaces to choose tests dynamically. For example, the Attrib plugin uses the interfaces and removes some tests.

To avoid that, I implemented the is_empty method which checks if a test file contains any test functions (or methods) recursively. With that change, the nose-launchable stop sending those empty test files to the subset endpoint.

@shuheiktgw shuheiktgw requested a review from ninjinkun July 15, 2021 06:53
@shuheiktgw
Copy link
Contributor Author

Thank you!

@shuheiktgw shuheiktgw merged commit ee4ce15 into main Jul 15, 2021
@shuheiktgw shuheiktgw deleted the add_empty_check branch July 15, 2021 08:34
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