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 helpers to TestPipResult #8303

Merged
merged 1 commit into from May 23, 2020
Merged

Conversation

pradyunsg
Copy link
Member

Supercedes #7869, unblocking the rest of the work, toward updating all the call sites in our tests.

@pradyunsg pradyunsg added type: enhancement Improvements to functionality C: tests Testing and related things skip news Does not need a NEWS file entry (eg: trivial changes) labels May 22, 2020
@deveshks
Copy link
Contributor

There is already #8295 posted for this.

@ssurbhi560
Copy link
Contributor

@deveshks I will go on and close those PRs and as @pradyunsg mentioned here we will go on and work on using the helpers on pip's tests. :)

@pradyunsg
Copy link
Member Author

Whhops! I definitely missed that PR (sorry!).

None the less, I think @ssurbhi560 resolved the overlapping PRs conflict (thanks!) so, there's not really much for me to say or do here now.

@pradyunsg pradyunsg merged commit 7d875fa into pypa:master May 23, 2020
@pradyunsg pradyunsg deleted the nicer-test-helpers branch May 23, 2020 20:28
@pradyunsg
Copy link
Member Author

@ssurbhi560 @gutsytechster Your turn. ;)

@gutsytechster
Copy link
Contributor

Thanks, @pradyunsg for the merge. :)
@ssurbhi560 let me know which files are you updating?

@ssurbhi560
Copy link
Contributor

@gutsytechster I haven't yet started updating any files, so it'd be better if you let me know which ones you have already updated (and going to do) and then I will start working on remaining ones!

@gutsytechster
Copy link
Contributor

gutsytechster commented May 24, 2020

@ssurbhi560 as I can find, we have these 11 files to be updated:

  • tests/functional/test_download.py
  • tests/functional/test_install.py
  • tests/functional/test_install_compat.py
  • tests/functional/test_install_extras.py
  • tests/functional/test_install_index.py
  • tests/functional/test_install_reqs.py
  • tests/functional/test_install_upgrade.py
  • tests/functional/test_install_vcs_git.py
  • tests/functional/test_install_wheel.py
  • tests/functional/test_uninstall.py
  • tests/functional/test_wheel.py

I've taken reference from your previous PR https://github.com/pypa/pip/pull/7869/files. We can distribute the files, let's say you may go with the first 5 and I can go with the rest of them. Does it make sense?

PS: Please mention any other file in case I might've not noticed or mentioned.

@ssurbhi560
Copy link
Contributor

@gutsytechster sounds perfect to me!
Also I went on to check and found there a few more files we would need to update :

tests/functional/test_new_resolver_user.py
tests/functional/test_install_user.py
tests/functional/test_uninstall_user.py
tests/functional/tests_install_force_reinstall.py

So, I would go on and work with the first five from the list you mentioned above and the first two from the list of remaining files. Does this sounds good?

@gutsytechster
Copy link
Contributor

Sounds like a plan to me :) 👍

@xavfernandez
Copy link
Member

I'm a little late but I find that those helpers' names lack an assert part.
Was assert_did_create considered ?

@pradyunsg
Copy link
Member Author

Was assert_did_create considered ?

It was... I figured that it wasn't necessary. If you reckon it'd be helpful, I'm happy to file a PR myself after all the transitory PRs are merged. :)

@xavfernandez
Copy link
Member

I reckon it'd be helpful but if I'm the only one, I'll adapt.

@pfmoore
Copy link
Member

pfmoore commented Jun 9, 2020

I haven't been following the discussion, but I'd also be mildly in favour of having assert in the name. As it stands, my instincts are to write assert result.did_create(...). Again, it's not a big deal to me, but I wanted to note that @xavfernandez isn't the only one...

@sbidoul
Copy link
Member

sbidoul commented Jun 9, 2020

Same feeling as @xavfernandez here. To me did_create reads like a function that returns a boolean.

@sbidoul
Copy link
Member

sbidoul commented Jun 9, 2020

(sorry, I did not mean to insist, the last comment was not refreshed in my browser tab)

@pradyunsg
Copy link
Member Author

pradyunsg commented Jun 9, 2020

Alrighty. Let's do the {did_* -> assert_did_*} renaming once we merge the corresponding PRs for adopting these helpers (see PRs crosslinked by GitHub, near the end of #6050 currently). :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: tests Testing and related things skip news Does not need a NEWS file entry (eg: trivial changes) type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants