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

Add method to pip test result for path lookups #8295

Closed

Conversation

ssurbhi560
Copy link
Contributor

towards #6050

@McSinyx
Copy link
Contributor

McSinyx commented May 22, 2020

I wonder what's the purpose of having assertion after the return statement, since it seems that assertions don't have any special behavior in control flow, so that won't be executed.

@@ -353,6 +353,26 @@ def assert_installed(self, pkg_name, editable=True, with_files=[],
.format(**locals())
)

def did_create(self, path, message=None):
return '{}\n{}'.format(message, self) if message else self
Copy link
Contributor

@deveshks deveshks May 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is being repeated across all functions, so it's better to pull this out in its own function, and then call the function here. Something like

message = get_message(....)
assert str(path) in self.files_created, message

@ssurbhi560
Copy link
Contributor Author

The work has been done in #8303

@ssurbhi560 ssurbhi560 deleted the Add_method_for_path_lookups branch October 2, 2020 13:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants