Skip to content

Commit cc4de63

Browse files
partheaivanmkc
authored andcommitted
chore: migrate to owl bot (#96)
* chore: migrate to owl bot * chore: copy files from googleapis-gen ee56c3493ec6aeb237ff515ecea949710944a20f * chore: run the post processor
1 parent 686d515 commit cc4de63

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

datalabeling/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)