base:
  available:
    - A 1.0.0; depends B == 1.0.0, B == 2.0.0
    - B 1.0.0
    - B 2.0.0

cases:
-
  request:
    - install: A
  response:
    - error:
        code: 0
        stderr: ['incompatible']
  skip: legacy
  # -- a good error message would be:
  # A 1.0.0 has incompatible requirements B==1.0.0, B==2.0.0

-
  request:
    - install: ['B==1.0.0', 'B']
  response:
    - state:
       - B 1.0.0
  skip: legacy
  # -- 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
      error:
        code: 1
        stderr: >-
          Cannot install B==1.0.0 and B==2.0.0 because these
          package versions have conflicting dependencies.
  skip: legacy
  # -- 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
  # No matching distribution found for b, b
  # -- better would be:
  # cannot install different version (1.0.0, 2.0.0) of package B at the
  # 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
      error:
        code: 1
        stderr: 'no\s+matching\s+distribution'
  skip: legacy
  # -- 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
      error:
        code: 1
        stderr: 'no\s+matching\s+distribution'
  skip: legacy
  # -- currently the error message is:
  # Could not find a version that satisfies the requirement A==2.0
  # No matching distribution found for a
