From 18346d8deb858cc77d166ffea8ef76d9c9d48bfe Mon Sep 17 00:00:00 2001 From: historia Date: Sat, 12 Sep 2026 16:48:55 -0400 Subject: feat: automatic stereo mixdown --- lib/project/tests/test_gui_launcher.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/project/tests/test_gui_launcher.py') diff --git a/lib/project/tests/test_gui_launcher.py b/lib/project/tests/test_gui_launcher.py index 8111c67..758d034 100644 --- a/lib/project/tests/test_gui_launcher.py +++ b/lib/project/tests/test_gui_launcher.py @@ -18,10 +18,10 @@ def test_cli_gui_dispatch_preserves_configuration_flags(tmp_path, monkeypatch): config.write_text('profile = "narrator"\n') received = [] monkeypatch.setattr(gui, "serve", lambda *args, **kwargs: received.append((args, kwargs))) - monkeypatch.setattr(sys, "argv", ["producer", "gui", "--root", str(tmp_path), "--port", "9001", + monkeypatch.setattr(sys, "argv", ["producer", "gui", "--port", "9001", "--config", str(config), "--profile", "radio", "--target-lufs", "-21", "--set", "target_lufs=-18"]) cli.main() - assert received == [((tmp_path, 9001), {"config": config, "profile": "radio", "overrides": {"target_lufs": -18}})] + assert received == [((9001,), {"config": config, "profile": "radio", "overrides": {"target_lufs": -18}})] def test_launcher_only_gui_installs_extra_and_preserves_config_injection(tmp_path): @@ -58,7 +58,7 @@ def test_launcher_only_gui_installs_extra_and_preserves_config_injection(tmp_pat calls = [json.loads(line) for line in log.read_text().splitlines()] installs = [call for call in calls if call[0] == "pip"] assert len(installs) == 1 and installs[0][-1].endswith("[bundled-ffmpeg]") - args = launch("gui", "--root", str(checkout), "--port", "8766") + args = launch("gui", "--port", "8766") assert args[3:5] == ["gui", f"--config={checkout / 'config.toml'}"] calls = [json.loads(line) for line in log.read_text().splitlines()] installs = [call for call in calls if call[0] == "pip"] @@ -86,7 +86,7 @@ assert parser().parse_args(['config']).command == 'config' assert result.returncode == 0, result.stderr -def test_server_binds_only_loopback_and_prints_fragment_token(tmp_path, monkeypatch, capsys): +def test_server_binds_only_loopback_and_prints_plain_url(tmp_path, monkeypatch, capsys): pytest.importorskip("fastapi") uvicorn = pytest.importorskip("uvicorn") import socket @@ -103,11 +103,11 @@ def test_server_binds_only_loopback_and_prints_fragment_token(tmp_path, monkeypa def run(self, sockets): seen.append(sockets[0].getsockname()) monkeypatch.setattr(uvicorn, "Server", Server) - gui.serve(tmp_path, port) + gui.serve(port) assert seen == [("127.0.0.1", port)] output = capsys.readouterr().out - assert f"http://127.0.0.1:{port}/#token=" in output - assert len(output.split("#token=")[1].splitlines()[0]) >= 43 + assert f"http://127.0.0.1:{port}/\n" in output + assert "#token" not in output for invalid in (0, -1, 65536): with pytest.raises(ValueError): - gui.serve(tmp_path, invalid) + gui.serve(invalid) -- cgit v1.2.3