From 799f5e8522ac7b2336f6bc1748592ce962444add Mon Sep 17 00:00:00 2001 From: Alpamys Date: Thu, 21 May 2026 15:46:48 +0500 Subject: [PATCH] fix(tests): floor-check version assertion in test_version_bumped_to_0640 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was `assert soup_cli.__version__ == "0.64.0"` — broke on v0.65.0 bump on CI across all 9 platform×Python matrix jobs. The test intent is "v0.64.0 has shipped at least once"; switch to a tuple floor check matching the v0.51 / v0.54 / v0.57 / v0.60 idiom. Caught by CI red on v0.65.0 push to main; local pytest passed because we ran the v0.65 test files in isolation per the Release Checklist Step 4 ``pytest --no-cov`` invocation. Lesson: include the full suite in step 4 or grep for ``soup_cli.__version__ ==`` exact-equality assertions in any future version bump. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test_v0640_part_a.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_v0640_part_a.py b/tests/test_v0640_part_a.py index 4d7ffc7..d86c8b5 100644 --- a/tests/test_v0640_part_a.py +++ b/tests/test_v0640_part_a.py @@ -678,7 +678,12 @@ def test_cli_registers_tunability(): def test_version_bumped_to_0640(): import soup_cli - assert soup_cli.__version__ == "0.64.0" + # Floor check so future minor releases don't regress this test (matches + # v0.51.0 / v0.54.0 / v0.57.0 / v0.60.0 floor-check idiom). Exact-equality + # at "0.64.0" broke on the v0.65.0 bump — the test name preserves the + # intent (≥0.64.0 means v0.64.0 shipped). + parts = tuple(int(p) for p in soup_cli.__version__.split(".")[:3]) + assert parts >= (0, 64, 0), soup_cli.__version__ def test_no_top_level_heavy_imports():