Skip to content

Comments

dependency: base_pep_508_name always posix + fix tests#463

Merged
Secrus merged 1 commit intopython-poetry:mainfrom
radoering:fix-path-dependency-to-pep508
Sep 10, 2022
Merged

dependency: base_pep_508_name always posix + fix tests#463
Secrus merged 1 commit intopython-poetry:mainfrom
radoering:fix-path-dependency-to-pep508

Conversation

@radoering
Copy link
Member

@radoering radoering commented Sep 3, 2022

The tests for FileDependency and DirectoryDependency use the following assert:

assert dep.to_pep_508() == pep_508_output or pep_508_input

which is equal to

assert (dep.to_pep_508() == pep_508_output) or pep_508_input

and thus, always true if there is an pep_508_input. Actually it should be

assert dep.to_pep_508() == (pep_508_output or pep_508_input)

While fixing the tests, I noticed that the output for relative paths was platform-dependent. I changed it to always return posix paths.

  • Added tests for changed code.
  • Updated documentation for changed code.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2022

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 September 3, 2022 13:12
@Secrus Secrus merged commit 37cee90 into python-poetry:main Sep 10, 2022
@radoering radoering deleted the fix-path-dependency-to-pep508 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