From 5a7739389cdb99ca4e2356595dc4b6303796c23c Mon Sep 17 00:00:00 2001 From: Jakub Krasuski Date: Fri, 18 Sep 2026 23:46:37 +0200 Subject: [PATCH 1/3] fix: Build the ChromeNotFoundError message as one string --- CHANGELOG.md | 3 +++ src/choreographer/browsers/chromium.py | 4 ++-- tests/test_chromium.py | 17 ++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d68b0b04..e981724a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ where X.Y.Z is the semver of the most recent choreographer release. ## [Unreleased] +### Fixed +- Build the `ChromeNotFoundError` message as one string, so it no longer prints as a tuple + ## [1.4.0] -- 2026-09-16 diff --git a/src/choreographer/browsers/chromium.py b/src/choreographer/browsers/chromium.py index f500c7dd..79207745 100644 --- a/src/choreographer/browsers/chromium.py +++ b/src/choreographer/browsers/chromium.py @@ -190,8 +190,8 @@ def __init__( raise ChromeNotFoundError( "Browser not found. You can use get_chrome() or " "choreo_get_chrome from bash. please see documentation. " - f"Local copy ignored: {self.skip_local}. ", - f"Path calculated:: {self.path}.", + f"Local copy ignored: {self.skip_local}. " + f"Path calculated: {self.path}.", ) _logger.info(f"Found chromium path: {self.path}") diff --git a/tests/test_chromium.py b/tests/test_chromium.py index 7512f4e1..f036a65c 100644 --- a/tests/test_chromium.py +++ b/tests/test_chromium.py @@ -1,6 +1,8 @@ from __future__ import annotations -from choreographer.browsers.chromium import Chromium +import pytest + +from choreographer.browsers.chromium import ChromeNotFoundError, Chromium from choreographer.channels import Pipe @@ -64,3 +66,16 @@ def test_empty_proxy_server_uses_environment_fallback(tmp_path, monkeypatch): cli = _get_cli(tmp_path, proxy_server="") assert "--proxy-server=http://environment.example:8080" in cli + + +def test_browser_not_found_message_is_one_string(tmp_path): + missing = tmp_path / "chrome" + channel = Pipe() + try: + with pytest.raises(ChromeNotFoundError) as excinfo: + Chromium(channel, missing) + finally: + channel.close() + + assert len(excinfo.value.args) == 1 + assert f"Path calculated: {missing}." in str(excinfo.value) From 4e5a024c7c0bc3f0e4d3814cd93d5b39c7102652 Mon Sep 17 00:00:00 2001 From: Jakub Krasuski Date: Fri, 18 Sep 2026 23:46:50 +0200 Subject: [PATCH 2/3] docs: Link changelog entry to #314 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e981724a..8985a499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ where X.Y.Z is the semver of the most recent choreographer release. ## [Unreleased] ### Fixed -- Build the `ChromeNotFoundError` message as one string, so it no longer prints as a tuple +- Build the `ChromeNotFoundError` message as one string, so it no longer prints as a tuple [[#314](https://github.com/plotly/choreographer/pull/314)] ## [1.4.0] -- 2026-09-16 From 9d0c4beb7b4033e11d85e88b3485acc503fa2839 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Mon, 21 Sep 2026 10:48:42 -0600 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8985a499..0257ac88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ where X.Y.Z is the semver of the most recent choreographer release. ## [Unreleased] ### Fixed -- Build the `ChromeNotFoundError` message as one string, so it no longer prints as a tuple [[#314](https://github.com/plotly/choreographer/pull/314)] +- Build the `ChromeNotFoundError` message as one string, so it no longer prints as a tuple [[#314](https://github.com/plotly/choreographer/pull/314)], with thanks to @Blizzeq for the contribution! ## [1.4.0] -- 2026-09-16