|
3 | 3 |
|
4 | 4 | """Nox sessions that mirror the repository's GitHub Actions validation. |
5 | 5 |
|
6 | | -Run ``nox -s ci`` to run every CI-equivalent check. Use a focused session while |
7 | | -developing (for example, ``nox -s lint`` or ``nox -s core_tests-3.10``). |
8 | | -The test sessions provision their required emulators when possible. |
| 6 | +Run ``nox -s ci`` for a representative local validation sweep. Use a focused |
| 7 | +session while developing (for example, ``nox -s lint`` or |
| 8 | +``nox -s core_tests-3.10``). The test sessions provision their required |
| 9 | +emulators when possible. |
9 | 10 |
|
10 | 11 | Usage: |
11 | 12 |
|
@@ -121,7 +122,7 @@ def _start_azurite( |
121 | 122 | session: nox.Session, |
122 | 123 | ports: Sequence[int], |
123 | 124 | arguments: Sequence[str], |
124 | | -) -> subprocess.Popen[str] | None: |
| 125 | +) -> subprocess.Popen[bytes] | None: |
125 | 126 | """Start Azurite unless another local instance already owns its ports.""" |
126 | 127 | open_ports = [port for port in ports if _is_port_open(port)] |
127 | 128 | if len(open_ports) == len(ports): |
@@ -161,13 +162,14 @@ def _start_azurite( |
161 | 162 | session.log("Started Azurite for this session.") |
162 | 163 | return process |
163 | 164 |
|
164 | | - process.terminate() |
| 165 | + if process.poll() is None: |
| 166 | + process.terminate() |
165 | 167 | process.wait() |
166 | 168 | session.error("Azurite did not become ready within 30 seconds.") |
167 | 169 | return None |
168 | 170 |
|
169 | 171 |
|
170 | | -def _stop_process(process: subprocess.Popen[str] | None) -> None: |
| 172 | +def _stop_process(process: subprocess.Popen[bytes] | None) -> None: |
171 | 173 | """Stop a service process that this Nox session started.""" |
172 | 174 | if process is not None and process.poll() is None: |
173 | 175 | process.terminate() |
|
0 commit comments