From 328b01a2dd545d70a078db8df1e91b02d65bfc9c Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 23 Sep 2026 22:25:28 +0200 Subject: test: read the WebRTC transport's source as a set of files Source-reading tests take their text from node_source (node) and node_tree (hub): webrtc_server.py plus anything under transport/webrtc/, so a check for something's absence keeps reading the code it guards if that code moves. test_node_source_scope holds the boundary. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-node/tests/test_hwaccel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/meshbay-node/tests/test_hwaccel.py') diff --git a/packages/meshbay-node/tests/test_hwaccel.py b/packages/meshbay-node/tests/test_hwaccel.py index a79d784..0e6c6ab 100644 --- a/packages/meshbay-node/tests/test_hwaccel.py +++ b/packages/meshbay-node/tests/test_hwaccel.py @@ -15,11 +15,10 @@ real file. import re import sys -from pathlib import Path import pytest from meshbay_node import hwaccel -from meshbay_node.transport import webrtc_server +from node_source import webrtc_source from conftest import needs_subprocess @@ -94,7 +93,7 @@ def test_every_encoder_produces_what_the_node_announces(): and every mode is checked against it. Changing the arguments of one encoder without the other, or changing either without the announced string, fails. """ - source = Path(webrtc_server.__file__).read_text(encoding="utf-8") + source = webrtc_source() announced = set(re.findall(r"avc1\.([0-9a-f]{6})", source)) assert announced == {"640029"}, ( "the streaming path announces a codec string this test does not know " -- cgit v1.2.3