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

add error checking to yaml test files

This commit is contained in:
Ilan Schnell 2020-05-20 13:52:07 -05:00 committed by Tzu-ping Chung
parent 982fddf9c0
commit 54f350d524
4 changed files with 34 additions and 19 deletions

View file

@ -9,12 +9,16 @@ cases:
request:
- install: A
response:
- state: null
skip: true
- error:
code: 0
stderr: incompatible
skip: old
# -- currently the error message is:
# a 1.0.0 has requirement B==1.0.0, but you'll have b 2.0.0 which is incompatible.
# a 1.0.0 has requirement B==1.0.0, but you'll have b 2.0.0 which is
# incompatible.
# -- better would be:
# A 1.0.0 has incompatible requirements B==1.0.0, B==2.0.0
-
request:
- install: ['B==1.0.0', 'B']
@ -24,12 +28,16 @@ cases:
skip: old
# -- old error:
# Double requirement given: B (already in B==1.0.0, name='B')
-
request:
- install: ['B==1.0.0', 'B==2.0.0']
response:
- state: null
skip: true
error:
code: 1
stderr: 'No matching distribution'
skip: old
# -- currently the (new resolver) error message is:
# Could not find a version that satisfies the requirement B==1.0.0
# Could not find a version that satisfies the requirement B==2.0.0
@ -39,24 +47,32 @@ cases:
# same time.
# -- the old error message was actually better here:
# Double requirement given: B==2.0.0 (already in B==1.0.0, name='B')
-
request:
- install: B==1.5.0
response:
- state: null
skip: true
error:
code: 1
stderr: 'No matching distribution'
skip: old
# -- currently (new resolver) error message is:
# Could not find a version that satisfies the requirement B==1.5.0
# No matching distribution found for b
# -- the old error message was actually better here:
# Could not find a version that satisfies the requirement B==1.5.0 (from versions: 1.0.0, 2.0.0)
# No matching distribution found for B==1.5.0
-
request:
- install: A==2.0
response:
- state: null
skip: true
error:
code: 1
stderr: 'No matching distribution'
skip: old
# -- currently the error message is:
# Could not find a version that satisfies the requirement A==2.0
# No matching distribution found for a

View file

@ -9,12 +9,10 @@ cases:
request:
- install: A
response:
- conflicting:
- required_by: [A 1.0.0, B 1.0.0]
selector: D == 1.0.0
- required_by: [A 1.0.0, C 1.0.0]
selector: D == 2.0.0
skip: true
- error:
code: 1
stderr: No matching distribution found
skip: old
# -- currently the error message is:
# Could not find a version that satisfies the requirement D==2.0.0 (from c)
# Could not find a version that satisfies the requirement D==1.0.0 (from b)

View file

@ -12,11 +12,9 @@ cases:
- state:
- A 1.0.0
- C 1.0.0
- conflicting:
- required_by: [A 1.0.0]
selector: C == 1.0.0
- required_by: [B 1.0.0]
selector: C == 2.0.0
skip: true
- error:
code: 0
stderr: incompatible
skip: old
# -- currently the error message is:
# a 1.0.0 has requirement C==1.0.0, but you'll have c 2.0.0 which is incompatible.

View file

@ -282,7 +282,10 @@ cases:
- install: ['html5lib', 'six ==1.8.2']
response:
- state: null
skip: true
error:
code: 1
stderr: satisfies the requirement
skip: old
# -- the new resolver tells:
# Could not find a version that satisfies the requirement six==1.8.2
# Could not find a version that satisfies the requirement six>=1.9 (from html5lib)