Skip to content

Commit 2c2ad20

Browse files
partheagcf-owl-bot[bot]
authored andcommitted
chore: migrate to owl bot (#270)
* chore: migrate to owl bot * chore: copy files from googleapis-gen 130ce904e5d546c312943d10f48799590f9c0f66 * chore: run the post processor * 🦉 Updates from OwlBot Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2a9d355 commit 2c2ad20

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

logging/samples/snippets/noxfile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,16 @@ def blacken(session: nox.sessions.Session) -> None:
172172
def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None:
173173
"""Runs py.test for a particular project."""
174174
if os.path.exists("requirements.txt"):
175-
session.install("-r", "requirements.txt")
175+
if os.path.exists("constraints.txt"):
176+
session.install("-r", "requirements.txt", "-c", "constraints.txt")
177+
else:
178+
session.install("-r", "requirements.txt")
176179

177180
if os.path.exists("requirements-test.txt"):
178-
session.install("-r", "requirements-test.txt")
181+
if os.path.exists("constraints-test.txt"):
182+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
183+
else:
184+
session.install("-r", "requirements-test.txt")
179185

180186
if INSTALL_LIBRARY_FROM_SOURCE:
181187
session.install("-e", _get_repo_root())

0 commit comments

Comments
 (0)