Skip to content

Commit 0459dfb

Browse files
committed
Amend tests' "expect_error" for new default
1 parent fa1d49a commit 0459dfb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/functional/test_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def test_install_nonlocal_compatible_wheel_path(
952952
'--no-index',
953953
'--only-binary=:all:',
954954
Path(data.packages) / 'simplewheel-2.0-py3-fakeabi-fakeplat.whl',
955-
expect_error=use_legacy_resolver
955+
expect_error=not use_legacy_resolver
956956
)
957957
if not use_legacy_resolver:
958958
assert result.returncode == ERROR
@@ -1467,7 +1467,7 @@ def test_install_editable_with_wrong_egg_name(script, use_legacy_resolver):
14671467
result = script.pip(
14681468
'install', '--editable',
14691469
'file://{pkga_path}#egg=pkgb'.format(**locals()),
1470-
expect_error=use_legacy_resolver,
1470+
expect_error=not use_legacy_resolver,
14711471
)
14721472
assert ("Generating metadata for package pkgb produced metadata "
14731473
"for project name pkga. Fix your #egg=pkgb "

tests/functional/test_install_reqs.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def test_constraints_constrain_to_local_editable(
386386
'install', '--no-index', '-f', data.find_links, '-c',
387387
script.scratch_path / 'constraints.txt', 'singlemodule',
388388
allow_stderr_warning=True,
389-
expect_error=use_legacy_resolver
389+
expect_error=not use_legacy_resolver
390390
)
391391
if not use_legacy_resolver:
392392
assert 'Links are not allowed as constraints' in result.stderr
@@ -403,7 +403,7 @@ def test_constraints_constrain_to_local(script, data, use_legacy_resolver):
403403
'install', '--no-index', '-f', data.find_links, '-c',
404404
script.scratch_path / 'constraints.txt', 'singlemodule',
405405
allow_stderr_warning=True,
406-
expect_error=use_legacy_resolver
406+
expect_error=not use_legacy_resolver
407407
)
408408
if not use_legacy_resolver:
409409
assert 'Links are not allowed as constraints' in result.stderr
@@ -419,7 +419,7 @@ def test_constrained_to_url_install_same_url(script, data, use_legacy_resolver):
419419
'install', '--no-index', '-f', data.find_links, '-c',
420420
script.scratch_path / 'constraints.txt', to_install,
421421
allow_stderr_warning=True,
422-
expect_error=use_legacy_resolver
422+
expect_error=not use_legacy_resolver
423423
)
424424
if not use_legacy_resolver:
425425
assert 'Links are not allowed as constraints' in result.stderr
@@ -470,7 +470,7 @@ def test_install_with_extras_from_constraints(script, data, use_legacy_resolver)
470470
result = script.pip_install_local(
471471
'-c', script.scratch_path / 'constraints.txt', 'LocalExtras',
472472
allow_stderr_warning=True,
473-
expect_error=use_legacy_resolver
473+
expect_error=not use_legacy_resolver
474474
)
475475
if not use_legacy_resolver:
476476
assert 'Links are not allowed as constraints' in result.stderr
@@ -502,7 +502,7 @@ def test_install_with_extras_joined(script, data, use_legacy_resolver):
502502
result = script.pip_install_local(
503503
'-c', script.scratch_path / 'constraints.txt', 'LocalExtras[baz]',
504504
allow_stderr_warning=True,
505-
expect_error=use_legacy_resolver
505+
expect_error=not use_legacy_resolver
506506
)
507507
if not use_legacy_resolver:
508508
assert 'Links are not allowed as constraints' in result.stderr
@@ -519,7 +519,7 @@ def test_install_with_extras_editable_joined(script, data, use_legacy_resolver):
519519
result = script.pip_install_local(
520520
'-c', script.scratch_path / 'constraints.txt', 'LocalExtras[baz]',
521521
allow_stderr_warning=True,
522-
expect_error=use_legacy_resolver
522+
expect_error=not use_legacy_resolver
523523
)
524524
if not use_legacy_resolver:
525525
assert 'Links are not allowed as constraints' in result.stderr
@@ -558,7 +558,7 @@ def test_install_distribution_union_with_constraints(
558558
result = script.pip_install_local(
559559
'-c', script.scratch_path / 'constraints.txt', to_install + '[baz]',
560560
allow_stderr_warning=True,
561-
expect_error=use_legacy_resolver
561+
expect_error=not use_legacy_resolver
562562
)
563563
if not use_legacy_resolver:
564564
msg = 'Unnamed requirements are not allowed as constraints'
@@ -578,7 +578,7 @@ def test_install_distribution_union_with_versions(
578578
result = script.pip_install_local(
579579
to_install_001 + "[bar]",
580580
to_install_002 + "[baz]",
581-
expect_error=use_legacy_resolver,
581+
expect_error=not use_legacy_resolver,
582582
)
583583
if not use_legacy_resolver:
584584
assert (

0 commit comments

Comments
 (0)