Skip to content

Commit 4760d8d

Browse files
authored
chore(python): Noxfile recognizes that tests can live in a folder (#1334)
Pytest works just fine with tests organized inside a `tests` folder. I see no reason why we shouldn't accept that. Also, I wanted to put tests in dedicated folder in my samples ;) Tested it locally
1 parent 89dd35d commit 4760d8d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

synthtool/gcp/templates/python_samples/noxfile.py.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def _session_tests(
187187
) -> None:
188188
# check for presence of tests
189189
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
190+
test_list.extend(glob.glob("tests"))
190191
if len(test_list) == 0:
191192
print("No tests found, skipping directory.")
192193
else:

0 commit comments

Comments
 (0)