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.:

These would clarify that comparison remains correct around the boundaries when both segments are present and stripped in order.