Skip to content

Comments

constraints: allow whitespace padding in caret constraints (for consistency) and consolidate parse_constraint tests#606

Merged
radoering merged 1 commit intopython-poetry:mainfrom
radoering:test-parse-constraint-padding
Jun 18, 2023
Merged

constraints: allow whitespace padding in caret constraints (for consistency) and consolidate parse_constraint tests#606
radoering merged 1 commit intopython-poetry:mainfrom
radoering:test-parse-constraint-padding

Conversation

@radoering
Copy link
Member

Tests regarding whitespace padding were spread over several tests, although there already has been a dedicated test: test_parse_constraint_with_white_space_padding. However, this test did not only test whitespace padding but additional stuff that is already tested in the other tests (or at least fits better there).

This PR, removes duplicated tests and moves tests from test_parse_constraint_with_white_space_padding to other tests and vice versa to sharpen the objective of each test. Further, it improves test_parse_constraint_with_white_space_padding by systematically applying whitespace padding not only at the beginning and at the end of a constraint, but everywhere it is possible.

Thereby, it was noticed that padding was allowed for all types of constraints but caret constraints. This PR fixes this inconsistency.

…stency) and consolidate `parse_constraint` tests
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@radoering radoering requested a review from a team June 18, 2023 11:26
@radoering radoering merged commit 0749c55 into python-poetry:main Jun 18, 2023
@radoering radoering deleted the test-parse-constraint-padding branch November 24, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants