diff options
| author | historia <historiavg@proton.me> | 2026-09-12 16:48:55 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-12 16:48:55 -0400 |
| commit | 18346d8deb858cc77d166ffea8ef76d9c9d48bfe (patch) | |
| tree | e11bb5951a047ed372053906dcbb97b8651cee84 /lib/project/tests/test_gui_launcher.py | |
| parent | 464edbc4fd658728f06d3a7d98340aa28ff3e3ec (diff) | |
| download | producer-18346d8deb858cc77d166ffea8ef76d9c9d48bfe.tar.gz | |
feat: automatic stereo mixdown
Diffstat (limited to 'lib/project/tests/test_gui_launcher.py')
| -rw-r--r-- | lib/project/tests/test_gui_launcher.py | 16 |
1 files changed, 8 insertions, 8 deletions
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) |
