Skip to content

Commit

Permalink
chore(python): Noxfile recognizes that tests can live in a folder (#1334
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
m-strzelczyk committed Jan 19, 2022
1 parent 89dd35d commit 4760d8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions synthtool/gcp/templates/python_samples/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def _session_tests(
) -> None:
# check for presence of tests
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
test_list.extend(glob.glob("tests"))
if len(test_list) == 0:
print("No tests found, skipping directory.")
else:
Expand Down

0 comments on commit 4760d8d

Please sign in to comment.