-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Running tests offline #145
Comments
As people around here probably know, pipenv has a nice automatic deselection in its integration tests, and it would be great to see a solution like that become re-usable. But an env var is a simple stopgap, and is basic enough that I could contribute if it is acceptable. |
To be clear -- you obviously will need the internet or a fully mocked index to actually use the resolver backing requirementslib. As a consequence of doing resolution this also obviously means you will need some kind of index to query while running tests. Since the whole point is to resolve VCS and file dependencies, I am primarily testing VCS root dependencies. Again, those will likely demand connectivity. So if your goal is to simply make the light turn green I am not too sure we are on the same page here, since the tests obviously have a purpose. These tests are essentially the main way pipenv is tested these days because the pipenv test suite is large and cumbersome and essentially only tests from an interaction standpoint For the specifics:
Obviously attempts to build requirements of all types, not changing the test because it was literally copied from a pipenv regression test but will add an env var to work around the internet issue possibly?
This and the other git one could be updated but i'm pretty hesitant to rely only on local paths exclusively. Added a skip for this one
I feel like I was just too lazy to add a submodule here so it just gets cloned from the internet all the time for some reason
The important thing about this test was that it uses git to clone on the backend, because pip changed an implementation detail and it started writing things to stdout
this pretty clearly relies on actually getting requirements and package data out of the files it pulls off the internet so again it will have to be skipped I'm considering completely removing the dependencies module since we reimplemented the entire dependency resolver in various other places, we don't use it for anything currently. That would solve that problem. I'll add skips for those also. |
I just need some way to skip the tests which will need the internet, so it can be run in a disconnected rpmbuild environment. A simple marker on these tests would be enough to deselect them. The remaining tests do not validate requirementslib is working 100% correctly -- only that it works at all. If it isnt easy to deselect them, packagers often disable the entire test suite when it fails during an update, and then they dont notice when something breaks. Longer term, it would be good to pull out the |
@jayvdb that would be lovely, sadly I work far too much on pipenv related projects as is and my employer definitely doesn't care if I continue spending my time on open source, so that would have to be handled by someone else... |
Status update.
(other openSUSE test errors with no clear relation to this issue: #270 and #280) |
Current failures without internet are:
|
I cant find any support for de-selecting the tests which require internet access, such as when run inside a rpmbuild.
test_requirements.py
seems to be entirely online tests (5).Others
I was a bit surprised that
test_stdout_is_suppressed
andtest_get_local_ref
were online tests - with minor tweaks they might be assertions which can be made in an offline environment?Then
And finally
I suspect those two
test_local_req
errors are becauseenviron-config
depends onattrs
, and it fails during setup of the fixture because of network attempts, but pytest is obscuring the error in the fixture setup. Here is an example where it would be great to know this test should failure if there is no network, so I dont hunt around inside pytest unnecessarily to work out why it is failing ;-)The text was updated successfully, but these errors were encountered: