Commit a2a8cc2
tests: make test_walk_root deterministic
The mock server exposes the host's real filesystem, so assertions about
the contents of "/" depend on machine state: mock-ssh-server stats
every entry of a listing, so a single dangling symlink at the host root
fails the whole readdir, and fsspec's walk(on_error="omit") swallows
the error, silently turning the name/exists assertions into a no-op.
Assert only the yielded root, which distinguishes the fix (root "/")
from the regression (root "") on every machine. Also correct the
failure-mode note: most servers (e.g. OpenSSH) reject an empty path
with ENOENT outside REALPATH; servers implementing the SFTP draft's
empty-path rule resolve it to the default directory instead.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent d0bcbb3 commit a2a8cc2
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
0 commit comments