From 40ffeb0ce62f50746d83011496105399a4468050 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Mon, 3 Oct 2022 12:32:00 +0200 Subject: [PATCH] Fix version test which fails in local development --- tests/test_conda_lock.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_conda_lock.py b/tests/test_conda_lock.py index f2b1df138..4fdb4a955 100644 --- a/tests/test_conda_lock.py +++ b/tests/test_conda_lock.py @@ -1366,4 +1366,8 @@ def test_cli_version(capsys: "pytest.CaptureFixture[str]"): print(result.stdout, file=sys.stdout) print(result.stderr, file=sys.stderr) assert result.exit_code == 0 - assert __version__ in result.stdout + # Sometimes __version__ looks like "0.11.3.dev370+g315f170" and the part after + # ".dev" is often out-of-sync when doing local development. So we check only for + # the part before, in this case just "0.11.3". + version_without_dev = __version__.split(".dev")[0] + assert version_without_dev in result.stdout