pip's assert_installed

10 views
Skip to first unread message

Marcus Smith

unread,
May 9, 2015, 6:05:40 PM5/9/15
to pypa...@googlegroups.com

for functional pip tests, we have an "assert_installed" function which is not very good, and worse, it's not consistently used.

at it's core, I think it should be using pkg_resources (which it's not currently), but that's my first question, if people agree with that?

assuming you agree, then the second question is how to use it, since we need to use it against a *different* environment (the environment being functionally tested).

One thought is to construct a WorkingSet using the path entries of the target environment, but that's not particularly easy, and I worry about it being fragile, and itself a source of bugs.

So that leaves running pkg_resources code in a subprocess in the target environment, which is not very attractive, but I'm thinking it might be the best way.

thoughts?

Marcus

Donald Stufft

unread,
May 9, 2015, 6:11:39 PM5/9/15
to Marcus Smith, pypa...@googlegroups.com
I’m on the fence, I think fundamentally what we should be asserting is that after we run X commands, that the disk is in Y state, but i’m not sure of a sane way of doing that which doesn’t end up being reimplementing pkg_resources.

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

signature.asc
Reply all
Reply to author
Forward
0 new messages