fix when stripping both local and postrelease by dimbleby · Pull Request #921 · python-poetry/poetry-core (original) (raw)
Please address the comments from this code review:
Individual Comments
Comment 1
(">1.7.post2", "1.7.1", True), (">1.7.post2", "1.7.0.post2", False), (">1.7.post2", "1.7.0.post3", True), + (">1.7", "1.7.0.post1+local.1", False), ## >V MUST NOT match a local version of the specified version (">1.7.0", "1.7.0+local.1", False), **suggestion (testing):** Add complementary cases to fully exercise stripping of both postrelease and local segments.The new case is a solid regression test for the combined postrelease+local bug. To fully cover the intended behavior (stripping local after postrelease), please add a few complementary parametrized cases, e.g.:
(" >1.7", "1.7.0.post0+local.1", False)to show a version just below the boundary after stripping,(" >1.7", "1.7.1.post1+local.1", True)to show one just above the boundary,(" >1.7.post2", "1.7.0.post2+local.1", False)to mirror the existing>1.7.post2tests and confirm that adding a local segment to the exact postrelease still does not satisfy the>constraint.
These would clarify that comparison remains correct around the boundaries when both segments are present and stripped in order.