Skip to content

Commit eb0adc7

Browse files
gcf-owl-bot[bot]parthea
authored andcommitted
chore: detect samples tests in nested directories (#343)
* docs(nodejs_mono_repo): update broken links in README Source-Link: googleapis/synthtool@50db768 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978 * add pytest requirement for testing * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add pytest-xdist requirement for testing * remove obsolete files Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 9df015c commit eb0adc7

File tree

6 files changed

+12
-351
lines changed

6 files changed

+12
-351
lines changed

generated_samples/interactive-tutorials/events/noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ def _session_tests(
207207
session: nox.sessions.Session, post_install: Callable = None
208208
) -> None:
209209
# check for presence of tests
210-
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
211-
test_list.extend(glob.glob("tests"))
210+
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob(
211+
"**/test_*.py", recursive=True
212+
)
213+
test_list.extend(glob.glob("**/tests", recursive=True))
212214

213215
if len(test_list) == 0:
214216
print("No tests found, skipping directory.")

generated_samples/interactive-tutorials/noxfile.py

Lines changed: 0 additions & 310 deletions
This file was deleted.

generated_samples/interactive-tutorials/noxfile_config.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

generated_samples/interactive-tutorials/product/noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ def _session_tests(
207207
session: nox.sessions.Session, post_install: Callable = None
208208
) -> None:
209209
# check for presence of tests
210-
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
211-
test_list.extend(glob.glob("tests"))
210+
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob(
211+
"**/test_*.py", recursive=True
212+
)
213+
test_list.extend(glob.glob("**/tests", recursive=True))
212214

213215
if len(test_list) == 0:
214216
print("No tests found, skipping directory.")

generated_samples/interactive-tutorials/requirements.txt

Whitespace-only changes.

generated_samples/interactive-tutorials/search/noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ def _session_tests(
207207
session: nox.sessions.Session, post_install: Callable = None
208208
) -> None:
209209
# check for presence of tests
210-
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
211-
test_list.extend(glob.glob("tests"))
210+
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob(
211+
"**/test_*.py", recursive=True
212+
)
213+
test_list.extend(glob.glob("**/tests", recursive=True))
212214

213215
if len(test_list) == 0:
214216
print("No tests found, skipping directory.")

0 commit comments

Comments
 (0)