1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

473 commits

Author SHA1 Message Date
Pradyun Gedam
ce146f6666
tests: don't check the actual sequence in test 2017-11-06 00:52:36 +05:30
Pradyun Gedam
b9feb191a9
Merge pull request #4642 from pradyunsg/feature/idempotent-uninstall 2017-11-05 15:32:32 +05:30
Oz N Tiram
4370a5a37b Add a global option to disable colors (#4739)
* Add a global option to disable colors

 This is a fix for issue #2449

 All it does is simply add a global option --no-color

 Internally it switches ColorizedStreamHandler to StreamHandler if
 this flag is detected.

* Fix lint errors

 * not sure it makes the code more readable though ...

* Fix typo

* Choose logging class before assigning

 * As requested per review
 * Make the code shorter and easier to follow

* Be polite to followers, add commas

* Add functional test for the --no-color output

* Better detection of windows

* Fix fragile tests - can't trust script --quiet

 * The version found in Travis-CI does not respect this flag
   It added a prefix line and suffix line found if one does not
   add the flag --quiet (script from util-linux 2.26.2).

   As such the out  put is:

     Script started on Fri 27 Oct 2017 07:17:30 AM CEST
     \x1b[31mCannot uninstall requirement noSuchPackage, not installed\x1b[0m\n

     Script done on Fri 27 Oct 2017 07:17:31 AM CEST

  With this change, the test should pass, and is hopefully more stable.

* Simplify testing for color or no-color
2017-11-05 15:23:57 +05:30
Pradyun Gedam
cf989e5ace
tests: github repositories should use https (#4838) 2017-11-05 08:54:56 +05:30
Pradyun S. Gedam
8222d788f6
Switch pip uninstall behaviour to be idempotent
pip uninstall no longer aborts if a package is not installed; instead
it prints a warning that the package is not installed and it is
skipping the uninstallation of it for this reason.
2017-11-03 22:28:24 +05:30
Benoit Pierre
288a10b17a tests: fix freeze integration tests on Windows (#4832) 2017-11-03 20:06:47 +05:30
Calvin Smith
4e97d3d5f9 Freeze not installed (#4292, #4293) 2017-10-31 11:13:46 +05:30
Mathieu Bridon
62875be050 Record installed files in a deterministic order
Installed files are recorded by Pip in the order the underlying tool
(Distutils, Setuptools, ...) recorded them.

Unfortunately, at least Setuptools doesn't record them in a
deterministic order in the case of a directory being installed, as it
uses os.walk to find the list of files.

We could fix all those underlying tools to record their files in a
deterministic order in all situations. But fixing it once here in Pip
for all tools is certainly simpler and more future-proof.

This makes the installation more reproducible, and therefore more
verifiable.
2017-10-26 22:29:19 +02:00
Chris Jerdonek
b112292068 Address issue #1139: make --force-reinstall not require --upgrade (#4432)
* Add failing tests for issue #1139 re: --force-reinstall.

* Address issue #1139: make --force-reinstall not require --upgrade.

* Address review comments.

* Address @xavfernandez's review comments.

This makes the new tests not require network access.
2017-10-24 00:03:20 +02:00
Dustin Ingram
ff5b2013a0 Use correct executable name for completion command (#4755) 2017-10-12 10:59:53 +05:30
Benoit Pierre
961737ab98 Fix integration tests on Windows (#4769) 2017-10-06 20:51:42 +01:00
Pradyun Gedam
02c219e2c4 Merge pull request #4728 from scop/escseq
Python 3.6 invalid escape sequence deprecation fixes
2017-10-06 17:11:45 +05:30
Chris Jerdonek
adc932b6af Address @xavfernandez's review comments. 2017-10-05 15:52:10 -07:00
Chris Jerdonek
28061a71c5 Fix test after rebasing another time. 2017-10-05 13:35:14 -07:00
Chris Jerdonek
dd58b1427f Update imports after _internal refactoring. 2017-10-05 10:42:04 -07:00
Chris Jerdonek
1f44b2a586 Add failing test to check that no warning gets logged. 2017-10-05 10:42:04 -07:00
Chris Jerdonek
eebd561f00 Some clean-ups. 2017-10-05 10:42:04 -07:00
Chris Jerdonek
15d058edf0 Start using Git.get_revision_sha(). 2017-10-05 10:42:04 -07:00
Chris Jerdonek
85dc157147 Add Git.get_revision_sha() with tests. 2017-10-05 10:40:55 -07:00
Chris Jerdonek
b65dfd2686 Test installing after updating the remote repository. 2017-10-05 10:40:55 -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
035a2a720b Add failing tests for issue #1130. 2017-10-02 15:33:32 -07:00
Benoit Pierre
d778fc330e Small tests related cleanups (#4703)
* fix test not using temporary directory
* avoid creating a `cache_dir` directory in the source tree
* drop `data` fixture from tests that don't use it

* tests: fix pytest warning
2017-10-02 18:33:52 +01:00
Pradyun Gedam
fc7ca26489 Warn user when installing scripts outside PATH (#4553) 2017-10-02 17:54:37 +01: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
Dustin Ingram
8d96363882 Don't assume master branch exists when reinstalling editable package from Git (#4450)
* Add failing test

* Don't assume master branch is default

* Don't expect output to stderr

* Use the 'short ref' instead of the 'full ref'
2017-09-30 00:30:30 +02:00
Ville Skyttä
8fb2b6318f Python 3.6 invalid escape sequence deprecation fixes
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2017-09-15 23:35:45 +03:00
Pradyun S. Gedam
fcfdc0f189 Fix Tests to depend on testpypi 2017-09-12 15:41:52 +05:30
Donald Stufft
95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam
841f5dfb5c Add support for YAML based test files (#4637) 2017-08-07 12:03:43 -04:00
Xavier Fernandez
1c7876fa49 Fix test_install_no_binary_disables_building_wheels
The only files present in the cache were http cache files from the
pip install wheel command.
2017-07-21 18:08:53 +02:00
Xavier Fernandez
b709b1ef4a Add a common_wheels fixtures providing wheel & setuptools wheels 2017-07-21 18:08:53 +02:00
Pradyun S. Gedam
21be153044 Display where pip is looking for packages (#4483)
Display where PackageFinder is looking for packages
2017-06-26 21:45:47 +01:00
Pradyun S. Gedam
c92cbe7aba Add Required-by field to pip show (#4564) 2017-06-26 08:58:52 -04:00
Pradyun S. Gedam
4e47f04fe5 Sort imports 2017-06-13 23:41:31 +05:30
Pradyun S. Gedam
b0ed0f7e9b Merge branch 'master' into configuration-command 2017-06-13 21:26:10 +05:30
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
bd850c0798 Improve tests 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam
f6a7f4b7c4 🎨 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam
9430b9376f Also check unset functionality in test 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam
6cf5d7db54 Add basic tests for configuration 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam
3efb452a2a Use an enum-like attribute to refer to configuration sources 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam
f9990605dc Add non-working test for patched configuration file 2017-05-20 12:56:13 +05:30
Thomas Kluyver
20955812bf Merge branch 'master' into pep518 2017-05-19 11:04:32 +01:00
Pradyun S. Gedam
1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Thomas Kluyver
9c7ed29009 Fix some more tests which build packages from source 2017-05-13 23:47:17 +01:00
Thomas Kluyver
61f89c5e80 Make pep8 happy again 2017-05-13 23:10:34 +01:00
Thomas Kluyver
2e865164ba Find build requirements in the tmp copy of test data folder 2017-05-13 23:05:11 +01:00