diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-08 13:54:53 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-08 13:54:53 +0200 |
| commit | 28f1b5686c7ab200aeda6782f5f6e829c24759dd (patch) | |
| tree | bba1349896700d67d57f4aa28575b79649b408de /packages/meshbay-node/tests/test_stream_capacity.py | |
| parent | db69d0e351b59f6fd9335995c7994bd2933f668a (diff) | |
| download | meshbay-28f1b5686c7ab200aeda6782f5f6e829c24759dd.tar.gz | |
test(node): close the eleven failures, and the order-dependence behind seven
Nine of the eleven were defects in the suite, two were assertions describing
behaviour the code had deliberately changed. None was a bug in the node.
Seven had one cause. `check_media_tools()` writes two module globals;
`monkeypatch` restores what a test patched and knows nothing about what the
call under test then wrote, so a test that pointed `shutil.which` at
"/opt/bin/{n}.exe" left `_ffprobe_path` there — a Windows path, on Linux — for
the rest of the session. Every later test that actually runs ffprobe died on
FileNotFoundError, in two files about video transcoding, for a reason nowhere
near themselves. Run those files alone and they passed; that is what made it
look like an environment problem for so long.
The autouse `_restore_media_tool_paths` fixture in conftest.py puts both back
after every test. That closes the class, not just this instance: any future test
that resolves media tools is undone whether it remembers to or not, which is the
only way an order-dependent suite stops being one. Verified by removing the
call-site guard entirely and running the whole suite — green, so the fixture is
carrying it, and the call site keeps a pointer rather than a second copy of the
explanation.
The other four:
- two service tests were the only ones in test_platform.py that never set
`sys.platform` to "win32", so they hit "service mode is Windows-only";
- test_apps_enabled_policy expected `["chat"]` where `roster.enabled_apps`
inserts "files" at the front on read (and `ops.set_enabled_apps` on write),
because Settings is the one way back if every app were turned off. The code
is right; the assertion predates the guard, and is now ["files", "chat"];
- test_invite_then_join_delivers_the_gek passed a bare Path as a group's
`roots` two lines below building a RootSet for the transport. The handshake
died on `'PosixPath' object has no attribute 'describe'` and answered `error`
— scaffolding that never followed the move to several named roots (draft v6,
change 1).
1081 passed, 4 skipped, 0 failed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCGdheDLxGReuKHga3BtST
Diffstat (limited to 'packages/meshbay-node/tests/test_stream_capacity.py')
0 files changed, 0 insertions, 0 deletions