From ec1f3cc189564ba75db1573256bd47f569c9f282 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Thu, 25 Jun 2020 15:00:21 +0800 Subject: [PATCH] Fix YAML tests to reflect the new resolver error --- tests/yaml/conflict_1.yml | 4 +++- tests/yaml/conflict_2.yml | 8 +++----- tests/yaml/conflicting_diamond.yml | 14 +++++--------- tests/yaml/large.yml | 11 +++++------ 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/tests/yaml/conflict_1.yml b/tests/yaml/conflict_1.yml index b99e033dd..847bb2b6a 100644 --- a/tests/yaml/conflict_1.yml +++ b/tests/yaml/conflict_1.yml @@ -36,7 +36,9 @@ cases: - state: null error: code: 1 - stderr: 'no\s+matching\s+distribution' + stderr: >- + Cannot install B==1.0.0 and B==2.0.0 because these + package versions have conflicting dependencies. skip: old # -- currently the (new resolver) error message is: # Could not find a version that satisfies the requirement B==1.0.0 diff --git a/tests/yaml/conflict_2.yml b/tests/yaml/conflict_2.yml index f1f84f95e..8a51ad57f 100644 --- a/tests/yaml/conflict_2.yml +++ b/tests/yaml/conflict_2.yml @@ -22,9 +22,7 @@ cases: response: - state: null error: - stderr: 'no matching distribution found for six' + stderr: >- + Cannot install six<1.12 and virtualenv 20.0.2 because these + package versions have conflicting dependencies. skip: old - # -- currently the error message is: - # Could not find a version that satisfies the requirement six<1.12 - # Could not find a version that satisfies the requirement six<2,>=1.12.0 (from virtualenv) - # No matching distribution found for six, six diff --git a/tests/yaml/conflicting_diamond.yml b/tests/yaml/conflicting_diamond.yml index 4338cb4a0..0ea5f9ca8 100644 --- a/tests/yaml/conflicting_diamond.yml +++ b/tests/yaml/conflicting_diamond.yml @@ -11,13 +11,9 @@ cases: response: - error: code: 1 - stderr: 'no matching distribution found' + stderr: >- + Cannot install A and A because these package + versions have conflicting dependencies. + # TODO: Tweak this error message to make sense. + # https://github.com/pypa/pip/issues/8495 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) - # No matching distribution found for d, d - # -- This is a bit confusing, as both versions of D are available. - # -- better would be something like: - # A 1.0.0 -> B 1.0.0 -> D 1.0.0 - # A 1.0.0 -> C 1.0.0 -> D 2.0.0 diff --git a/tests/yaml/large.yml b/tests/yaml/large.yml index 62bb0a418..0d5f6f3ef 100644 --- a/tests/yaml/large.yml +++ b/tests/yaml/large.yml @@ -287,10 +287,9 @@ cases: - state: null error: code: 1 - stderr: 'version that satisfies the requirement' + stderr: >- + Cannot install six==1.8.2, html5lib 1.0.1, six==1.8.2 and + html5lib 0.999999999 because these package versions have + conflicting dependencies. + 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) - # -- the old error message (which I think was better): - # html5lib 1.0.1 has requirement six>=1.9, but you'll have six 1.8.2 which is incompatible.