Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency: base_pep_508_name always posix + fix tests #463

Merged
merged 1 commit into from
Sep 10, 2022

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.

@sonarcloud
Copy link

sonarcloud 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants