Skip to content

Commit 0b8f406

Browse files
yoshi-automationdandhlee
authored andcommitted
chore: template updates (#120)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/60d94463-5a7c-4c76-829d-2ff8e6f3696f/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: googleapis/synthtool@0a071b3
1 parent 62ff4ec commit 0b8f406

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

documentai/snippets/noxfile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,16 @@ def _session_tests(
174174
) -> None:
175175
"""Runs py.test for a particular project."""
176176
if os.path.exists("requirements.txt"):
177-
session.install("-r", "requirements.txt")
177+
if os.path.exists("constraints.txt"):
178+
session.install("-r", "requirements.txt", "-c", "constraints.txt")
179+
else:
180+
session.install("-r", "requirements.txt")
178181

179182
if os.path.exists("requirements-test.txt"):
180-
session.install("-r", "requirements-test.txt")
183+
if os.path.exists("constraints-test.txt"):
184+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
185+
else:
186+
session.install("-r", "requirements-test.txt")
181187

182188
if INSTALL_LIBRARY_FROM_SOURCE:
183189
session.install("-e", _get_repo_root())

0 commit comments

Comments
 (0)