Commit Graph

47 Commits

Author SHA1 Message Date
Stéphane Bidoul ccdfa74d79
Reduce reliance on .egg-info directories in test suite
Make more tests run with with_wheel and test
that a .dist-info directory is created.
2020-07-25 13:02:20 +02:00
Paul Moore e97b365529 Mark a few more tests as working under the new resolver 2020-06-10 13:08:37 +01:00
gutsytechster fa280b9370 tests(test_install_{vcs_git, wheel}.py): Refactor path lookups 2020-05-28 15:48:16 +05:30
Paul Moore c2fa0dd997 Add a mark for tests that fail on the new resolver 2020-05-21 15:39:00 +01:00
Jason R. Coombs 6282a307dc 👹 Feed the hobgoblins (delint). 2020-03-06 12:43:10 -05:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
Stéphane Bidoul (ACSONE) f5eba4f726
Add tests for git sha wheel caching 2019-11-03 22:54:33 +01:00
Chris Jerdonek 1ca61e14ba Assert that repo_url_path doesn't exist. 2019-09-21 02:31:25 -07:00
Chris Jerdonek 9a765b8cab Change local_checkout() to accept tmpdir. 2019-09-13 21:41:32 -07:00
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Chris Hunt 39ac9ca351 Rename compatible functions in tests.lib.path.Path. 2019-07-02 18:48:44 -04:00
Chris Jerdonek 7e109086b5 Remove unneeded expect_error=True in some vcs tests. 2019-05-06 14:55:16 -04:00
Chris Jerdonek e0e07bf046 Remove unneeded expect_stderr=True in some vcs tests. 2019-05-06 14:55:16 -04:00
Chris Jerdonek 61bb651bf1 Remove outdated test_git_works_with_editable_non_origin_repo().
This test has been replaced by test_freeze_editable_git_with_no_remote()
in test_freeze.py, with an updated and different test expectation.
2018-12-21 01:19:56 -08:00
Chris Jerdonek 4b0d8a8eb6 Move a hard-coded relative path out of tests/lib. 2018-11-11 22:16:42 -08:00
Chris Jerdonek 2dbd34724a Test Git.get_remote_url(). 2018-11-10 01:35:22 -08:00
Chris Jerdonek 0d817939c3 Fix tests on Python 3.4 (GROUP=2). 2018-08-21 13:35:29 -07:00
Chris Jerdonek 007dbf3ea6 Add two failing tests. 2018-08-21 04:00:30 -07:00
Chris Jerdonek f97baf9300 Add a test of installing from a repo with a non-master default branch. 2018-08-19 17:15:45 -07:00
Pradyun Gedam 1073b66b11
Merge pull request #5718 from cjerdonek/dry-up-with-install-version-pkg
DRY up test_install_vcs_git.py with _install_version_pkg()
2018-08-20 05:24:27 +05:30
Chris Jerdonek 1067c3abc6 DRY up test_install_vcs_git.py with _install_version_pkg(). 2018-08-19 12:17:10 -07:00
Chris Jerdonek 40555250c6 Remove unneeded @pytest.mark.network's inside test_install_vcs_git.py. 2018-08-19 03:36:14 -07:00
Chris Jerdonek b39bbba5e3 Address more review comments by @pradyunsg. 2018-08-19 01:03:26 -07:00
Chris Jerdonek 54b81e3a5c Put more of the URL pattern into _checkout_into_temp().
This addresses a review comment by @pradyunsg.
2018-08-19 00:30:33 -07:00
Chris Jerdonek 749c898a41 DRY up test_install_vcs_git.py with _checkout_into_temp(). 2018-08-18 23:37:46 -07:00
Chris Jerdonek b798e328aa DRY up test_install_vcs_git.py with _make_version_pkg_url(). 2018-08-18 20:53:15 -07:00
Chris Jerdonek 4e8cde753d Rename tests/functional/test_install_vcs.py to test_install_vcs_git.py. 2018-08-16 22:14:59 -07:00
Chris Jerdonek f115d1fa2d Combine tests/functional/test_install_vcs_git.py with other test modules. 2018-08-02 13:16:23 -07:00
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Chris Jerdonek 28061a71c5 Fix test after rebasing another time. 2017-10-05 13:35:14 -07:00
Chris Jerdonek 15d058edf0 Start using Git.get_revision_sha(). 2017-10-05 10:42:04 -07:00
Chris Jerdonek da30b7007d Address @pradyunsg's review comment. 2017-10-05 02:32:54 -07:00
Chris Jerdonek d646aaca72 Choose a better name, and other clean-ups. 2017-10-05 02:32:54 -07:00
Chris Jerdonek c66ecc73ab Address issue #4507: don't warn when installing from a commit hash (#4674)
* Add failing test for issue #4507.

* Add looks_like_hash() with tests.

* Add news file.

* Address issue #4507 by using looks_like_hash().

* Tweak warning text.

* Fix test after rebasing.

* Remove extra line.
2017-10-05 00:16:10 +02:00
Chris Jerdonek 3e56733df4 Add a RevOptions class (#4707)
* Add the RevOptions class, and test.

* Start using the RevOptions class.

* Add news file.

* Update for mypy.

* Fix test after rebasing.

* Address @xavfernandez's review comments.
2017-10-02 00:21:11 +02:00
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
Pradyun S. Gedam 1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Matt Robenolt 4c3ab41e90 Only update VCS when things have actually changed
This saves a network hop when using git and passing an explicit sha
as a ref by comparing the version that's already checked out.

Yields a ~4x speedup on my local machine

Before:
```
$ /usr/local/bin/pip --version
pip 7.1.0 from /usr/local/lib/python2.7/site-packages (python 2.7)
$ time /usr/local/bin/pip install --disable-pip-version-check -e git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
Obtaining raven-dev from git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
  Updating ./src/raven-dev clone (to 56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e)
  Could not find a tag or branch '56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e', assuming commit.
Installing collected packages: raven-dev
  Running setup.py develop for raven-dev
Successfully installed raven-dev
/usr/local/bin/pip install --disable-pip-version-check -e   0.84s user 0.48s system 39% cpu 3.300 total
```

After:
```
$ /Users/matt/.virtualenvs/pip/bin/pip --version
pip 7.2.0.dev0 from /Users/matt/code/pip (python 2.7)
$ time /Users/matt/.virtualenvs/pip/bin/pip install --disable-pip-version-check -e git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
Obtaining raven-dev from git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
checking version
  Skipping because already up-to-date.
Installing collected packages: raven-dev
  Running setup.py develop for raven-dev
Successfully installed raven-dev
/Users/matt/.virtualenvs/pip/bin/pip install --disable-pip-version-check -e   0.59s user 0.22s system 98% cpu 0.824 total
```
2015-09-01 13:23:18 -07:00
Matej Stuchlik c5024dc851 Mark tests requiring Internet access 2015-01-15 00:53:15 +01:00
Donald Stufft 95035fc5c4 Turn on everything in flake8
flake8 ignores some errors by default, these ignored by defaults
change sometimes. This will make things stabler by selecting
everything.
2014-02-24 16:52:23 -05:00
Donald Stufft 9f027337a8 Use Flake8 on the test of pip's Python files 2014-01-28 19:47:58 -05:00
Donald Stufft 0c42245f21 Replace explicit calls to reset_env() with the script fixture 2013-08-27 06:47:23 -04:00
Donald Stufft 9894c8baac Refactor tests.lib
* Move virtualenv creation out of TestPipEnvironment
* Remove global state and force explicit use of TestPipEnvironment
  instances
* Remove "backup" virtualenv copying and instead create new
  virtual environments each time.
* Remove the monkeypatched "PyPICache" functionality
* Remove things that were not being used anymore and were dead
  weight
* Remove sitecustomize support which was primarily used to
  monkeypatch the "PyPICache" but was used in one or two other
  tests.
2013-08-21 22:40:16 -04:00
Donald Stufft da0bc4b1d1 Switch to using py.test as the test runner instead of nose
* Better output with the bare asserts we use throughout the tests
* Function fixtures are pretty nice, especially as a way to
  start a background server or create an isolated virtualenv
2013-08-21 10:19:58 -04:00
Carl Meyer f7e6fec08c Merge branch 'develop' into bugfix-git183-v2
* develop:
  add back in old tox.ini
  add back test lost in the restructure
  more functional/unit tests restructure
  break up tests dir into data, unit tests, and functional tests
2013-05-29 16:41:15 -06:00
Marcus Smith 28298c413d more functional/unit tests restructure 2013-05-29 13:41:13 -07:00
Renamed from tests/functional/test_vcs_git.py (Browse further)