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 take too long to run #1721

Closed
3 of 11 tasks
grzn opened this issue Apr 15, 2014 · 14 comments
Closed
3 of 11 tasks

tests take too long to run #1721

grzn opened this issue Apr 15, 2014 · 14 comments
Labels
auto-locked Outdated issues that have been locked by automation C: tests Testing and related things type: maintenance Related to Development and Maintenance Processes

Comments

@grzn
Copy link
Contributor

grzn commented Apr 15, 2014

mainly because of the various repository cloning being done in the tests from the internet, mainly from GitHub.

Here are some very slow tests, for example:

@grzn
Copy link
Contributor Author

grzn commented Apr 15, 2014

Some suggestions:

  • clone virtualenv once to a tempdir and have all the tests use that repository instead of cloning from GitHub over and over again
  • clone a very small repository instead of virtualenv (which got pretty heavy already) with the minimal set of files (setup.py, empty python module, what else?)
  • although GitHub is much slower than PyPI these days, we can set up a temp devpi-server for caching the packages

@Ivoz
Copy link
Contributor

Ivoz commented Apr 16, 2014

Thanks, done the *first in #1726, updated the issue to be a checklist

@grzn
Copy link
Contributor Author

grzn commented Apr 16, 2014

cool.
another improvement worth doing is this:

  • a lot of tests call local_checkout and pass tmpdir.join("cache") as the directory. thing is that tmpdir is not shared between the tests, so there isn't really a cached directory for repository clones.

@grzn
Copy link
Contributor Author

grzn commented Apr 16, 2014

about test_upgrade_vcs_req_with_dist_found: why not upload the pip-test-package to pypi and then use that?

@grzn
Copy link
Contributor Author

grzn commented Apr 16, 2014

slowest tests on my Mac when using local devpi server:

482.88s call     tests/functional/test_install_upgrade.py::test_upgrade_vcs_req_with_dist_found
276.17s call     tests/functional/test_install.py::test_install_using_install_option_and_editable
220.59s call     tests/functional/test_uninstall.py::test_uninstall_editable_with_source_outside_venv
17.07s call     tests/functional/test_install_upgrade.py::TestUpgradeSetuptools::test_from_setuptools_7_to_setuptools_7_with_distribute_7_installed
13.11s call     tests/functional/test_install_upgrade.py::TestUpgradeSetuptools::test_py2_py3_from_distribute_6_to_setuptools_7
12.49s call     tests/functional/test_help.py::test_help_commands_equally_functional
8.56s call     tests/functional/test_freeze.py::test_freeze_bazaar_clone
7.66s call     tests/functional/test_install.py::test_vcs_url_urlquote_normalization
7.32s call     tests/functional/test_install.py::test_install_editable_from_bazaar
7.29s call     tests/functional/test_install_config.py::test_config_file_override_stack

@Ivoz
Copy link
Contributor

Ivoz commented Apr 16, 2014

@grzn that particular test is about testing vcs paths, not downloading from pypi

@grzn
Copy link
Contributor Author

grzn commented Apr 16, 2014

isn't the test installs virtualenv from a specific commit, then attempts to upgrade from the index (pypi)? we can't just replace it with pip-test-package because its not on pypi?
or I did misunderstood the test?

@grzn
Copy link
Contributor Author

grzn commented Apr 16, 2014

the 3 at the top take 60% of total time

@Ivoz
Copy link
Contributor

Ivoz commented Apr 16, 2014

Definitely, it would be great to chop pip's testing time in half or more, if these can be optimized.

@Ivoz
Copy link
Contributor

Ivoz commented Apr 16, 2014

@grzn oh about test_upgrade_vcs_req_with_dist_found, I didn't read it through enough. Conservatively, I think it would be preferable to find a simple package already on pypi, and keep that one on github only.

@grzn
Copy link
Contributor Author

grzn commented Apr 17, 2014

I prefer to build one for this test and not rely on other packages that are not controlled by pypa and that can disappear from pypi or github and then break the test

@Ivoz
Copy link
Contributor

Ivoz commented Apr 21, 2014

https://github.com/kennethreitz/envoy could be a good candidate

@alex
Copy link
Member

alex commented Apr 24, 2014

You can check test_upgrade_vcs_req_with_dist_found off your list.

@xavfernandez xavfernandez added the C: tests Testing and related things label Oct 8, 2015
@pradyunsg pradyunsg added the type: maintenance Related to Development and Maintenance Processes label Jun 28, 2017
@pradyunsg
Copy link
Member

Closing in favour of #4497.

@pradyunsg pradyunsg mentioned this issue Oct 5, 2017
12 tasks
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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: tests Testing and related things type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

No branches or pull requests

5 participants