Christopher Hunt
b27956928f
Merge pull request #8553 from uranusjr/header-location-prefix
...
Header location prefix
2020-07-07 21:37:50 -04:00
Christopher Hunt
53aa1a932b
Merge pull request #8538 from McSinyx/parallel-test-teardown
...
Make utils.parallel tests tear down properly
2020-07-07 21:19:28 -04:00
Chris Hunt
f878fcdeec
Rename function that reject location install options
...
Since it no longer shows a deprecation warning, the previous name
doesn't fit.
2020-07-07 19:11:11 -04:00
Chris Hunt
89572a7d40
Throw CommandError on any location-related install options
2020-07-07 19:11:11 -04:00
Chris Hunt
b46d8ab01a
Refactor overriding test to not use disallowed option
...
Similar to our previous test refactoring, this removes the usage of
`--home` from the test command.
"Overriding" in the original test meant "placed after" in the
command-line arguments, which makes sense because setuptools will use
the last argument passed.
2020-07-07 19:11:02 -04:00
Chris Hunt
50d7b930d3
Create more robust test for isolated --install-option
...
The current test depends on passing `--home` to `--install-option`.
Since we would like that to fail, we need to use another argument. None
of the other possible arguments have a visible side-effect, so we just
write the provided arguments to a file and check that in the test.
2020-07-07 19:10:27 -04:00
Chris Hunt
ffddab6986
Test that RECORD is populated correctly for data files
2020-07-07 09:25:16 -04:00
Chris Hunt
a365764e57
Add test for RECORD population by make_wheel
2020-07-07 09:25:16 -04:00
Tzu-ping Chung
600d5272e6
Add failing test for --prefix location
2020-07-07 18:53:33 +08:00
Christopher Hunt
334f06e224
Merge pull request #8054 from deveshks/correct-package-name-while-install
...
Canonicalize req name while doing pre-install package search
2020-07-06 12:10:33 -04:00
Christopher Hunt
161ee7f852
Merge pull request #8548 from chrahunt/better-wheel-empty-dir-test
...
Refactor test for empty directory in wheel
2020-07-06 09:25:31 -04:00
Devesh Kumar Singh
04fedfe53c
Create custom get_distribution function
2020-07-06 13:42:05 +05:30
Devesh Kumar Singh
2bdec6c9fd
Parametrize unit test
2020-07-06 13:32:09 +05:30
Devesh Kumar Singh
40261a475f
Add unit tests to verify pkg name normalization
2020-07-06 13:32:09 +05:30
Tzu-ping Chung
01e0700e68
Skip installing if the version matches locally
...
This check only applies to explicit requirements since we avoid
downloading the dist from finder altogether when there is a matching
installation (although the check wouldn’t change the behaviour in that
case anyway).
We can do this when we build the `ExplicitRequirement` instead, like how
we did for `SpecifierRequirement`, but that would require us to resolve
the direct requirement’s version eagerly, which I don’t want to.
The implemented approach checks the version only after resolution, at
which point the distribution is already built anyway and the operation
is cheap.
2020-07-06 11:06:14 +08:00
Christopher Hunt
4ba51d2e9c
Merge pull request #8501 from uranusjr/refactor-create-link-collector
...
Tidy up link collector constructor imports
2020-07-05 21:44:31 -04:00
Chris Hunt
ba96ba3b08
Reduce empty directory test coupling to implementation
...
Our previous test required that the implementation use a temporary
directory and unpack the wheel in-place. Now we just provide a
conventional empty directory in the wheel file itself.
2020-07-05 20:16:36 -04:00
Chris Hunt
a9c7f229b0
Create sample project wheel inline
2020-07-05 20:16:36 -04:00
Christopher Hunt
1f8a4dde26
Merge pull request #8541 from chrahunt/refactor/compile-file-next-steps
...
Byte-compile files after installation
2020-07-05 12:56:39 -04:00
Chris Hunt
42c01ae97e
Normalize Path to str in wheel tests
...
In our next commit we will use the scheme path to locate files to
byte-compile. If the scheme path is a `Path`, then that causes
`compileall.compile_file` (via `py_compile.compile`) to fail with:
```
.tox/py38/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py:615: in install_unpacked_wheel
success = compileall.compile_file(
../../../.pyenv/versions/3.8.0/lib/python3.8/compileall.py:157: in compile_file
ok = py_compile.compile(fullname, cfile, dfile, True,
../../../.pyenv/versions/3.8.0/lib/python3.8/py_compile.py:162: in compile
bytecode = importlib._bootstrap_external._code_to_timestamp_pyc(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
code = <code object <module> at 0x7fa7e274f500, file "/tmp/user/1000/pytest-of-chris/pytest-37/test_std_install_with_direct_u0/dest/lib/sample/__init__.py", line 1>, mtime = 1593910285.2200587, source_size = 134
> ???
E ValueError: unmarshallable object
```
Debugging in gdb shows that the error is set due to the `Path` object
being present in the code object, which `marshal.dumps` can't handle
(frame 1):
```
0 w_complex_object (v=<optimized out>, flag=<optimized out>, p=0x7fffffff7160) at Python/marshal.c:564
1 w_object (v=<Path at remote 0x7fffee51f120>, p=0x7fffffff7160) at Python/marshal.c:370
2 w_complex_object (v=<code at remote 0x7fffee591710>, flag=<optimized out>, p=0x7fffffff7160) at Python/marshal.c:544
3 w_object (v=<code at remote 0x7fffee591710>, p=0x7fffffff7160) at Python/marshal.c:370
4 w_complex_object (v=('1.2.0', <code at remote 0x7fffee591710>, 'main', None), flag=<optimized out>, p=0x7fffffff7160) at Python/marshal.c:475
5 w_object (v=('1.2.0', <code at remote 0x7fffee591710>, 'main', None), p=0x7fffffff7160) at Python/marshal.c:370
6 w_complex_object (v=<code at remote 0x7fffee591ea0>, flag=<optimized out>, p=0x7fffffff7160) at Python/marshal.c:539
7 w_object (p=0x7fffffff7160, v=<code at remote 0x7fffee591ea0>) at Python/marshal.c:370
8 PyMarshal_WriteObjectToString (version=<optimized out>, x=<code at remote 0x7fffee591ea0>) at Python/marshal.c:1598
9 marshal_dumps_impl (module=<optimized out>, version=<optimized out>, value=<code at remote 0x7fffee591ea0>) at Python/marshal.c:1739
10 marshal_dumps (module=<optimized out>, args=<optimized out>, nargs=<optimized out>) at Python/clinic/marshal.c.h:124
```
In the interest of easy git bisects, we commit this fix before the code
that would expose the bug.
2020-07-05 09:38:08 -04:00
Pradyun Gedam
8db4fc8224
Merge pull request #8530 from pradyunsg/rollout-flags
2020-07-05 01:50:25 +05:30
Pradyun Gedam
107ec292c2
Merge pull request #8539 from pradyunsg/warn-on-unsupported-use-of-constraints
2020-07-05 01:48:54 +05:30
Pradyun Gedam
28592d4c31
Allow for the deprecation warning in tests
2020-07-05 01:01:02 +05:30
Chris Hunt
b5f02f9dd8
Check that expected text is written in include files
...
This is a little more specific than checking that we happened to create
an already-empty file, and is a better mirror for reality.
2020-07-04 14:23:10 -04:00
Chris Hunt
0b0d53e8fa
Use wheel helper function instead of pre-created wheel file
2020-07-04 14:22:15 -04:00
Chris Hunt
00191b2db1
Explicitly test that header file was created as-expected
...
Since this is the special part of this test. This gives us more
confidence that we're doing the right thing when removing the standalone
wheel file next.
2020-07-04 14:22:15 -04:00
Nguyễn Gia Phong
512221e1c1
Make utils.parallel tests tear down properly
2020-07-04 15:07:38 +07:00
Chris Hunt
3930e4b063
Drop unused argument
2020-07-03 19:46:45 -04:00
Chris Hunt
d49d97f19f
Pass Wheel distribution to install.wheel.get_entrypoints
...
Right now we're just wiring up the arguments. Next we will actually use
them.
2020-07-03 19:46:45 -04:00
Chris Hunt
a953787152
Extract entrypoint test text construction into variable
...
We need this to construct the new argument to `get_entrypoints`.
2020-07-03 19:46:45 -04:00
Chris Hunt
3fad029b77
Test `get_entrypoints` when none are expected
2020-07-03 17:49:56 -04:00
Chris Hunt
dcd5cadcfd
Expect a plain list in get_csv_rows_for_installed
...
This makes get_csv_rows_for_installed simpler, because it is not
modifying its arguments. We can also more easily refactor RECORD file
reading since it is now decoupled from getting the installed RECORD file
rows.
2020-07-03 12:25:12 -04:00
Pradyun Gedam
49b793cd03
Set correct envvar for new-resolver tests
2020-07-03 20:11:36 +05:30
Pradyun Gedam
79de2c8911
Switch to --use-feature for determining which resolver to use
...
Also changes all invocations in the tests, to the new flag.
2020-07-03 18:49:56 +05:30
Christopher Hunt
4645ecbdb0
Merge pull request #8447 from jku/use-valid-signals-on-py38
...
test server: Don't mask invalid signals on py38
2020-07-02 12:03:11 -04:00
Jussi Kukkonen
23ec070cf1
test server: use set of signals
...
This is what signal.pthread_sigmask() really wants and matches signal.valid_signals() output
Co-authored-by: Christopher Hunt <chrahunt@gmail.com>
2020-07-02 18:00:29 +03:00
Xavier Fernandez
09f9b0030d
Merge pull request #8096 from deveshks/list-config-files
...
Add option to list config files with pip config
2020-07-02 15:01:35 +02:00
Pradyun Gedam
e774eccf46
Merge pull request #8343 from uranusjr/entrypoint-unicode
2020-06-30 14:33:24 +00:00
Pradyun Gedam
18431be48f
Merge pull request #8467 from McSinyx/lazy-wheel
2020-06-30 13:39:04 +00:00
Pradyun Gedam
93b0683d65
Merge pull request #8470 from deveshks/remove-always-unzip
2020-06-30 13:33:30 +00:00
Pradyun Gedam
17608c43d1
Merge pull request #8465 from deveshks/collector-debug-to-warn
2020-06-29 18:28:10 +00:00
Devesh Kumar Singh
6c899ed0c8
Update warning message to specify HTTP request
2020-06-29 22:20:11 +05:30
Pradyun Gedam
3a22663ab2
Merge pull request #8320 from McSinyx/pools
2020-06-29 07:54:14 +00:00
Devesh Kumar Singh
46790a4f3c
Improve warning message for invalid vcs schemes
2020-06-28 16:23:07 +05:30
Devesh Kumar Singh
499e112275
Add unit tests to check vcs and archive url with invalid scheme
2020-06-28 16:23:07 +05:30
Devesh Kumar Singh
056f119ca9
Add test to verify global config file path
2020-06-28 16:22:01 +05:30
Devesh Kumar Singh
6e62481568
Add unit tests for pip config debug
2020-06-28 16:22:01 +05:30
Devesh Kumar Singh
7a8f374c39
Add option to list config files with pip config
2020-06-28 16:22:00 +05:30
Xavier Fernandez
9a3c082070
Merge pull request #8182 from deveshks/no-input-tests
...
Enable --no-input option by adding docs and tests
2020-06-26 21:29:19 +02:00
Tzu-ping Chung
ec7324fba0
Tidy up link collector constructor imports
...
make_link_collector() was in self_outdated_check, a module responsible
for checking whether the currently-running pip is outdated, but is
imported by things that has nothing to do with this outdated check. Move
the function to be a class method in LinkCollector so the module
hierarchy makes more sense.
2020-06-26 17:31:28 +08:00
Nguyễn Gia Phong
25a25a0975
Test network.lazy_wheel.dist_from_wheel_url
2020-06-26 15:15:28 +07:00
Devesh Kumar Singh
4ecd7ecbc7
Assert result string in test_prompt_for_authentication
2020-06-26 07:22:21 +05:30
Devesh Kumar Singh
6119a837ea
Add unit tests for --no-input flag
2020-06-26 07:21:45 +05:30
Nguyễn Gia Phong
0a3b20f9b8
Drop parallel map for Python 2 and the non-lazy variant
...
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-25 21:10:49 +07:00
Nguyễn Gia Phong
13539d00f8
Wrap lazy map as well
2020-06-25 21:10:49 +07:00
Nguyễn Gia Phong
e7f637e5ca
Add tests for utils.parallel
2020-06-25 21:10:49 +07:00
Paul Moore
3dad80a314
Lint fix
2020-06-25 13:00:11 +01:00
Paul Moore
cdc4e40dad
Test is checking the old resolver's broken behaviour
2020-06-25 13:00:11 +01:00
Devesh Kumar Singh
bd70025c98
Remove --always-unzip based tests
2020-06-25 16:52:15 +05:30
Tzu-ping Chung
ec1f3cc189
Fix YAML tests to reflect the new resolver error
2020-06-25 15:00:21 +08:00
Pradyun Gedam
8c3447e85e
Merge pull request #8440 from uranusjr/yaml-tests
2020-06-24 18:38:59 +05:30
Pradyun Gedam
fb68794188
Merge pull request #8026 from sbidoul/requested-sbi
2020-06-24 18:24:30 +05:30
Paul Moore
b966e1383b
Merge pull request #8482 from uranusjr/new-resolver-union-with-versions
...
Mark new resolver test failure on extra union
2020-06-24 13:20:13 +01:00
Tzu-ping Chung
95477931b2
Mark new resolver test failure on extra union
2020-06-23 20:45:41 +08:00
Tzu-ping Chung
da23209fbe
Expect deprecation warning for build_dir in tests
2020-06-23 20:18:42 +08:00
Stéphane Bidoul
acab2ee54e
Deprecate --build-dir
2020-06-21 19:05:55 +02:00
Paul Moore
3a3d1d5afe
Merge pull request #8468 from pfmoore/nr_test_messages
...
Test message check fixes
2020-06-19 11:01:17 +01:00
Paul Moore
a7e3f8d088
Test message check fixes
2020-06-18 18:05:51 +01:00
Paul Moore
9626dacec5
Some tests need to monkeypatch the new resolver internals
2020-06-18 15:49:18 +01:00
Paul Moore
d287033599
Merge pull request #8394 from pfmoore/nr_conflict_message
...
Improve the message for "Resolution Conflict" errors
2020-06-18 13:45:51 +01:00
Tzu-ping Chung
fd3a785018
Reduce regex use when not necessary
...
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-18 17:15:58 +08:00
Paul Moore
2795742b31
Add handling of inconsistent root requirements
2020-06-17 16:47:04 +01:00
Paul Moore
09d311594e
Move error handling to factory.get_installation_error()
2020-06-17 16:44:53 +01:00
Jussi Kukkonen
dd42e7ec25
test server: Don't mask invalid signals on py38
...
This removes warnings from test output in python 3.8:
/usr/lib/python3.8/signal.py:60: RuntimeWarning:
invalid signal number 32, please use valid_signals()
2020-06-16 17:58:44 +03:00
Tzu-ping Chung
5ee2eeda21
Make the failing tests fail
2020-06-15 16:38:10 +08:00
Tzu-ping Chung
9a2527ad09
Rename CFFI for PyPy
2020-06-15 15:47:38 +08:00
Ilan Schnell
0462774be1
add comment about skiping error checking test on Windows
2020-06-15 15:34:37 +08:00
Ilan Schnell
4b6ce4fbe4
add restore re.I flag
2020-06-15 15:34:37 +08:00
Ilan Schnell
2198e2b2ab
Update tests/yaml/conflicting_triangle.yml
...
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell
599a494945
Update tests/yaml/conflicting_diamond.yml
...
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell
f6691c0aca
Update tests/yaml/conflict_2.yml
...
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell
6e07c0fd82
Update tests/functional/test_yaml.py
...
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell
bf3b1859fc
add ability to match error messages against regular expressions
2020-06-15 15:34:37 +08:00
Ilan Schnell
e1f007b314
check for stderr regex in linter
2020-06-15 15:34:37 +08:00
Ilan Schnell
f11c6d6cbd
on Windows, the errors behave differently
2020-06-15 15:34:36 +08:00
Ilan Schnell
13ce5209b4
add error checks - run circular tests with new resolver
2020-06-15 15:34:36 +08:00
Ilan Schnell
fec4a0dabd
update yaml linter
2020-06-15 15:34:36 +08:00
Ilan Schnell
54f350d524
add error checking to yaml test files
2020-06-15 15:34:36 +08:00
Ilan Schnell
982fddf9c0
add checking exit code and stderr message
2020-06-15 15:34:36 +08:00
Ilan Schnell
a45f657f97
add test for double install
2020-06-15 15:34:36 +08:00
Ilan Schnell
2e086eca40
add test case
2020-06-15 15:34:36 +08:00
Ilan Schnell
7dc345386a
add huge yaml test (579 packages) going to add more test cases
2020-06-15 15:34:35 +08:00
Ilan Schnell
4d17ec6442
add errors draft
2020-06-15 15:34:35 +08:00
Ilan Schnell
708b675ba7
add test for unavailable version
2020-06-15 15:34:35 +08:00
Ilan Schnell
b2895a5876
add test cases to large.yml
2020-06-15 15:34:35 +08:00
Ilan Schnell
2f884c9379
disable debug output files
2020-06-15 15:34:35 +08:00
Ilan Schnell
ec288fec0e
add comment to large.yml
2020-06-15 15:34:35 +08:00
Ilan Schnell
e8bc39274d
add test case to install cachecontrol
2020-06-15 15:34:35 +08:00
Ilan Schnell
7b4bfcb03b
work around bug in wheel generation for names which have "-" i them
2020-06-15 15:34:35 +08:00
Ilan Schnell
5e707eec4b
add large yaml test
2020-06-15 15:34:35 +08:00