From d92c5b311b0e64ebefe19ae31fa199a5cacd52ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Wed, 25 Oct 2023 12:04:46 +0200 Subject: [PATCH] fix pypy integration tests --- CHANGELOG.md | 1 + test/integration/helpers.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 162c67a4b..13ff99501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * `--quiet` now will implicitly set `--noProgress` option as well +* pypy integration tests ## [3.11.0] - 2023-10-04 diff --git a/test/integration/helpers.py b/test/integration/helpers.py index 27bd79592..d22fb01ce 100755 --- a/test/integration/helpers.py +++ b/test/integration/helpers.py @@ -398,6 +398,11 @@ def should_succeed( if expected_pattern is not None: assert re.search(expected_pattern, stdout), \ f'did not match pattern="{expected_pattern}", stdout="{stdout}"' + if platform.python_implementation().lower() == 'pypy': + # TODO: remove after pypy removes the leftover print and resolve + # https://github.com/Backblaze/B2_Command_Line_Tool/issues/936 + while stdout.startswith('/'): + stdout = stdout.split('\n', 1)[-1] return stdout