Commit c68f588
fix(ci): clear all 7 pre-existing pytest failures
Picks up where the previous mypy fix (d671910) left off — pytest is now
the visible failure surface, with 7 distinct tests red across all 3
Python versions in the matrix. All four root causes are real bugs
unrelated to recent feature work, just never noticed because mypy
was failing before pytest got a chance to run.
1. webdav_provider.get_content() — auth lookup now happens AFTER the
pending-shortcut check.
Pending uploads (uuid='pending-...') and missing-uuid resources
return io.BytesIO(b"") immediately without touching auth_service.
Fixes:
test_get_content_returns_empty_for_pending_resource
test_get_content_returns_empty_when_no_uuid
2. webdav_server.start() — server_choice validation now runs first.
Previously, an invalid choice fell through to provider construction
(which calls auth) and surfaced a MissingCredentialsError before
reaching the explicit ValueError that the test expects. Moved the
{'auto','waitress','cheroot'} check to the top of try-block.
Fixes:
test_invalid_server_choice_does_not_unbound_local
3. drive._available_memory() — Linux fallback now gated on
sys.platform.startswith('linux').
The else-branch read /proc/meminfo for any non-darwin / non-win32
platform, including the synthetic 'unknown-os' that the test patches
sys.platform to in order to force the 4 GB fallback. Now only Linux
takes that branch; everything else falls through.
Fixes:
test_available_memory_falls_back_to_4gb_when_all_probes_fail
4. requirements-dev.txt — added `cheroot>=10.0`.
tests/test_webdav_server_start_branches.py exercises the cheroot
branch in start() via sys.modules injection, but `from cheroot
import wsgi` first imports the cheroot package itself, which is not
installed on CI (only waitress is in requirements.txt). Adding
cheroot to dev requirements makes the test pass without changing
production install (CI uses requirements-dev.txt; users still install
from requirements.txt).
Fixes:
test_explicit_cheroot_choice_uses_cheroot
test_https_with_cheroot_attempts_ssl_setup
test_https_with_cheroot_generates_certs_when_missing
Verified locally:
$ mypy --no-incremental cli.py services
Success: no issues found in 8 source files
$ pytest tests/ -q --ignore=tests/test_live_smoke.py
............................. 100%
No behaviour change in any happy-path runtime flow — every fix is a
control-flow tightening that makes the suite pass without touching
the operations the suite was already verifying.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d671910 commit c68f588
4 files changed
Lines changed: 32 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
320 | 324 | | |
321 | 325 | | |
322 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
142 | 153 | | |
143 | | - | |
| 154 | + | |
144 | 155 | | |
145 | 156 | | |
146 | 157 | | |
| |||
0 commit comments