Commit Graph

39 Commits

Author SHA1 Message Date
Damian Shaw 68529081c2
Enforce f-strings via Ruff (#12393) 2023-11-07 09:14:56 +00:00
Wu Zhenyu dba399fe6a Fix #12166
- tests expected results indendation was off
- add bugfix news entry
2023-10-07 15:15:51 +08:00
Tzu-ping Chung 2fad07e6e2 Merge branch 'main' into no-import-from-conftest 2023-10-03 16:11:30 +08:00
Tzu-ping Chung c3160c5423 Avoid importing things from conftest
It is generally discouraged to import from conftest. Things are now
moved to tests.lib and imported from there instead.

Also did some cleanup to remove the no-longer-needed nullcontext shim.
2023-05-09 15:43:53 +08:00
Wu Zhenyu fb454572b2
Fix `pip completion --zsh` 2023-04-04 15:52:05 +08:00
Paul Moore ea2318fbf9 Minor zipapp-related fixes and skips for some tests 2022-07-12 10:12:17 +01:00
Tzu-ping Chung 42359a9605 Migrate tests to use pathlib.Path
The pip-specific Path implementation has been removed, and all its
usages replaced by pathlib.Path. The tmpdir and tmpdir_factory fixtures
are also removed, and all usages are replaced by tmp_path and
tmp_path_factory, which use pathlib.Path.

The pip() function now also accepts pathlib.Path so we don't need to put
str() everywhere. Path arguments are coerced with os.fspath() into str.
2022-06-08 19:58:46 +08:00
Frost Ming 6a1ed5c0f4
Add completion script for powershell (#9025) 2022-04-15 09:32:42 +01:00
Andy Freeland e752b1a26b
Include files/folders in `pip install` autocomplete (#10682) 2022-01-25 18:27:09 +00:00
Jon Dufresne c71cf88049 Complete type annotations of tests/functional/ directory 2021-11-18 18:26:17 -08:00
Pradyun Gedam 585037a80a
Cleanup implicit string concatenation 2021-08-20 13:37:52 +01:00
Pradyun Gedam 94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Andrey Bienkowski 9b2cb894ba Convert more str.format() calls to f-strings 2021-02-13 09:27:17 +03:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
Chris Hunt 1f9028851d Make shared script with launchers installed 2019-10-30 01:54:57 -04:00
Chris Hunt ab6b17b2a6 Refactor autocomplete test helper to use shared script 2019-10-30 01:53:48 -04:00
Chris Hunt cc73b2b933 Use shared autocomplete_script for tests 2019-10-30 01:53:45 -04:00
Chris Hunt b0eed267a6 Remove autocomplete import from pip._internal.__init__ 2019-09-21 15:27:47 -04:00
Chris Jerdonek 76a89542a8
Merge pull request #6856 from chrahunt/maint/remove-unneeded-expect-error-stderr
Remove unnecessary expect_error
2019-08-12 15:08:56 -07:00
Chris Hunt 0a6b3cedae Remove unnecessary expect_error. 2019-08-10 22:39:57 -04:00
Chris Hunt df36ddfb0d Merge branch 'master' into maint/merge-5924 2019-08-06 23:42:04 -04:00
Xavier Fernandez 5e573df69c Add deprecate_python fixture to easily deprecate python versions
pip usually emits a warning and tests have to be adapted
2019-01-12 21:50:40 +01:00
Benoit Pierre 689f97c4ed fix failing tests 2018-10-29 23:33:21 +01:00
Ani Hayrapetyan 5643475d1c pip autocompletion should silence of KeyboardInterrupts 2018-10-26 12:11:11 -04:00
Benoit Pierre add3801163 tests: rework tests virtual environment
- cleanup virtualenv creation code
- ensure all testing virtual environments use a recent version
  of setuptools / wheel, making it easier to switch to custom
  versions of those, as well as reducing network accesses
- reduce size of testing virtual environment, slightly speeding
  up the testsuite
2018-10-18 23:28:37 +02:00
Laurie Opperman 10911fe881 Fix error when autocompleting after flag
When running autocomplete after any command-line option with unspecified
'metavar' attribute, a traceback for an 'AttributeError' would be
displayed. This is fixed for first checking if 'metavar' was defined.
Fixes #5751
2018-09-17 21:56:46 +10:00
Kexuan Sun 14fe337bcf Improve autocompletion function on file name completion (#5125) 2018-06-21 22:59:31 +05:30
Segev Finer 1b357e5810 Add tests for auto completion of short options 2018-02-06 00:04:14 +02:00
Dustin Ingram ff5b2013a0 Use correct executable name for completion command (#4755) 2017-10-12 10:59:53 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Ville Skyttä cee7a53712 Python 3.6 invalid escape sequence deprecation fixes 2017-03-20 13:54:29 +01:00
c22 f4320aa1f0 Updated "none shell" test 2016-09-23 09:20:38 +10:00
c22 4e2b5c7d00 Update test_completion.py
Fixed the test and got the line length < 80
2016-09-23 09:20:38 +10:00
c22 aef0254953 Added pip completion support for fish shell. 2016-09-23 09:19:47 +10:00
Donald Stufft b7309c6bcc Remove the items deprecated for removal in 7.0 2015-04-07 04:20:51 -04: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
Marcus Smith 2e2ce0f4e9 break up tests dir into data, unit tests, and functional tests 2013-05-29 13:41:12 -07:00
Renamed from tests/test_completion.py (Browse further)