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

tests: fix test_finder_detects_latest_already_satisfied_pypi_links #5901

Conversation

benoit-pierre
Copy link
Member

  • use the correct PyPI URL (need HTTPS or it's ignored)
  • ensure the PyPI index is actually hit (fail if the network is down)

- use the correct PyPI URL (need HTTPS or it's ignored)
- ensure the PyPI index is actually hit (fail if the network is down)
@cjerdonek cjerdonek added C: tests Testing and related things skip news Does not need a NEWS file entry (eg: trivial changes) C: finder PackageFinder and index related code labels Oct 20, 2018
@cjerdonek
Copy link
Member

cc: @uranusjr

@uranusjr
Copy link
Member

Sorry I missed this. What is the failure this intends to fix?

@benoit-pierre
Copy link
Member Author

@uranusjr: just fixing the test.

@uranusjr
Copy link
Member

But why does the test need fixing, isn’t it passing now on master? (Sorry if the question sound dumb, I don’t understand the context of this.)

@cjerdonek
Copy link
Member

FWIW, I have the same question.

@benoit-pierre
Copy link
Member Author

I don't understand why it's not clear from the PR description: the test is not doing it's job, it's passing yes, but more importantly it's not failing when it should.

@cjerdonek
Copy link
Member

Okay, thanks. @uranusjr Can you review this since this relates to the code that you've been putting a lot of thought into?

@uranusjr
Copy link
Member

I see, sorry it didn’t seem obvious to me since I am not familiar with what find_requirement does.

for page in finder_get_pages(locations, project_name):
get_pages.page_found = True
yield page
get_pages.page_found = False
Copy link
Member

Choose a reason for hiding this comment

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

Would it be more pragmatic to use the mock’s side_effect for this, instead of mocking the function with a custom one? That way you can also add an assert finder._get_pages.call_count == 1 to make the check more obvious.

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Nov 10, 2018
@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: finder PackageFinder and index related code C: tests Testing and related things S: awaiting response Waiting for a response/more information skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants