| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3be59ce commit 9fad759
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | from __future__ import absolute_import | |
| 20 | 20 | import os | |
| 21 | + import pathlib | ||
| 21 | 22 | import shutil | |
| 22 | 23 | ||
| 23 | 24 | import nox | |
@@ -30,6 +31,8 @@ | |||
| 30 | 31 | SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] | |
| 31 | 32 | UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] | |
| 32 | 33 | ||
| 34 | + CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() | ||
| 35 | + | ||
| 33 | 36 | # 'docfx' is excluded since it only needs to run in 'docs-presubmit' | |
| 34 | 37 | nox.options.sessions = [ | |
| 35 | 38 | "unit", | |
@@ -84,13 +87,15 @@ def lint_setup_py(session): | |||
| 84 | 87 | ||
| 85 | 88 | def default(session): | |
| 86 | 89 | # Install all test dependencies, then install this package in-place. | |
| 87 | - session.install("asyncmock", "pytest-asyncio") | ||
| 88 | 90 | ||
| 89 | - session.install( | ||
| 90 | - "mock", "pytest", "pytest-cov", | ||
| 91 | + constraints_path = str( | ||
| 92 | + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | ||
| 91 | 93 | ) | |
| 94 | + session.install("asyncmock", "pytest-asyncio", "-c", constraints_path) | ||
| 92 | 95 | ||
| 93 | - session.install("-e", ".") | ||
| 96 | + session.install("mock", "pytest", "pytest-cov", "-c", constraints_path) | ||
| 97 | + | ||
| 98 | + session.install("-e", ".", "-c", constraints_path) | ||
| 94 | 99 | ||
| 95 | 100 | # Run py.test against the unit tests. | |
| 96 | 101 | session.run( | |
@@ -117,6 +122,9 @@ def unit(session): | |||
| 117 | 122 | @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) | |
| 118 | 123 | def system(session): | |
| 119 | 124 | """Run the system test suite.""" | |
| 125 | + constraints_path = str( | ||
| 126 | + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | ||
| 127 | + ) | ||
| 120 | 128 | system_test_path = os.path.join("tests", "system.py") | |
| 121 | 129 | system_test_folder_path = os.path.join("tests", "system") | |
| 122 | 130 | ||
@@ -141,10 +149,8 @@ def system(session): | |||
| 141 | 149 | ||
| 142 | 150 | # Install all test dependencies, then install this package into the | |
| 143 | 151 | # virtualenv's dist-packages. | |
| 144 | - session.install( | ||
| 145 | - "mock", "pytest", "google-cloud-testutils", | ||
| 146 | - ) | ||
| 147 | - session.install("-e", ".") | ||
| 152 | + session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path) | ||
| 153 | + session.install("-e", ".", "-c", constraints_path) | ||
| 148 | 154 | ||
| 149 | 155 | # Run py.test against the system tests. | |
| 150 | 156 | if system_test_exists: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,14 +19,14 @@ | |||
| 19 | 19 | "git": { | |
| 20 | 20 | "name": "synthtool", | |
| 21 | 21 | "remote": "https://github.com/googleapis/synthtool.git", | |
| 22 | - "sha": "f5c5904fb0c6aa3b3730eadf4e5a4485afc65726" | ||
| 22 | + "sha": "86ed43d4f56e6404d068e62e497029018879c771" | ||
| 23 | 23 | } | |
| 24 | 24 | }, | |
| 25 | 25 | { | |
| 26 | 26 | "git": { | |
| 27 | 27 | "name": "synthtool", | |
| 28 | 28 | "remote": "https://github.com/googleapis/synthtool.git", | |
| 29 | - "sha": "f5c5904fb0c6aa3b3730eadf4e5a4485afc65726" | ||
| 29 | + "sha": "86ed43d4f56e6404d068e62e497029018879c771" | ||
| 30 | 30 | } | |
| 31 | 31 | } | |
| 32 | 32 | ], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments