diff --git a/synthtool/gcp/templates/python_library/noxfile.py.j2 b/synthtool/gcp/templates/python_library/noxfile.py.j2 index 5c9ac730c..2d060529f 100644 --- a/synthtool/gcp/templates/python_library/noxfile.py.j2 +++ b/synthtool/gcp/templates/python_library/noxfile.py.j2 @@ -76,9 +76,10 @@ def default(session): {%- if microgenerator %} session.install("asyncmock", "pytest-asyncio") {% endif %} - session.install("mock", "pytest", "pytest-cov") - session.install("-e", "."){% for dependency in unit_test_dependencies %} - session.install("-e", "{{dependency}}"){% endfor %} + session.install("mock", "pytest", "pytest-cov" {% for d in unit_test_external_dependencies %}"{{d}}"{% if not loop.last %},{% endif %}{% endfor %}) + session.install("-e", ".") + {% for dependency in unit_test_local_dependencies %}session.install("-e", "{{dependency}}"){% endfor %} + {% for dependency in unit_test_dependencies %}session.install("-e", "{{dependency}}"){% endfor %} # Run py.test against the unit tests. session.run(