-
-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
Since stubs-only packages have to be installed, add a simple script that installs the stubs and then invokes pytest.
Since this is a small PR I'll merge in a day or so barring complaints. |
LGTM, except shouldn't the filename be |
Ah yeah, not good to buck conventions. Changed it. |
runtests.py
Outdated
|
||
def main(): | ||
subprocess.run( | ||
['pip', 'install', STUBS_ROOT], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh now the more substantial comment: I don't think this works correctly in a virtualenv or conda env. It may install into the base env instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can depend on OS and env vars, see e.g. https://stackoverflow.com/questions/8052926/running-subprocess-within-different-virtualenv-with-python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm ok, switched it to do [sys.executable, '-m', 'pip', ...]
. It seems like if we were trying to do something more complicated we could still run into problems, but since we're just invoking pip we're ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work I think.
Merged, thanks @person142 |
Since stubs-only packages have to be installed, add a simple script that installs the stubs and then invokes pytest.
Just a small shortcut for