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

chore: Add check for tests in directory #1321

Merged
merged 3 commits into from
Jan 11, 2022

Conversation

leahecole
Copy link
Contributor

@leahecole leahecole requested a review from a team as a code owner January 10, 2022 19:42
@leahecole leahecole changed the title Add check for tests in directory chore: Add check for tests in directory Jan 10, 2022
@leahecole leahecole added the automerge Merge the pull request once unit tests and other checks pass. label Jan 11, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit 0a58b14 into master Jan 11, 2022
@gcf-merge-on-green gcf-merge-on-green bot deleted the noxfile-check-for-tests branch January 11, 2022 06:28
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 11, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Jan 11, 2022
PR #1321 added `glob.glob` but the import statement was missing.
gcf-merge-on-green bot pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this pull request Jan 11, 2022
This adds a check to the noxfile to see if there are tests in the directory. To test, use the noxfile-template in any directory with tests. Then try it on a directory like [this one](https://github.com/nikitamaia/python-docs-samples/tree/geospatial-sandbox/people-and-planet-ai/geospatial-classification/serving_app) which is found in PR #7291. This does assume that all tests are of the format `*_test.py` - if we want, I can also include a check for `test_*.py`, because I know that's a common Python pattern even though it's not the one we use. 

Corresponding PR in synthtool googleapis/synthtool#1321


cc @davidcavazos - this will hopefully remove the need for your workaround
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