Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f9366da
Remove setup.py develop code path
sbidoul Mar 8, 2025
cafa715
Remove legacy editable tests
sbidoul May 10, 2025
aed7024
Refactor get_created_direct_url test
sbidoul May 18, 2025
8add656
Rework PipTestResult for detection of modern editables
sbidoul May 18, 2025
50804ff
Update tests that were looking for egg-link files to detect editables
sbidoul May 10, 2025
85bb55a
Test there is no fallback when backend has no PEP 660
sbidoul Sep 27, 2025
3cc9e6b
Update uninstall tests that depend on legacy install methods
sbidoul Sep 27, 2025
4eda5e4
Update pip show test that depends on legacy install method
sbidoul Sep 27, 2025
674df32
Remove non PEP 517 code paths
sbidoul Sep 28, 2025
90fa35d
Remove --use-pep517 option test
sbidoul Sep 28, 2025
0dbd25e
Remove --no-use-pep517 test
sbidoul Sep 28, 2025
05e53ef
Update creation of test package that must fail building
sbidoul Sep 28, 2025
fe02d65
Run unit tests with no build isolation
sbidoul Sep 28, 2025
873a1c5
Remove tests that exercise --global-option
sbidoul Sep 28, 2025
017d5e6
Rework test that needed --global-option to use --config-setting
sbidoul Sep 28, 2025
0e07ba2
Test install pip without build isolation
sbidoul Sep 28, 2025
16b2601
Remove legacy 'setup.py clean' tests
sbidoul Sep 28, 2025
8fec3f0
Add --no-build-isolation to tests
sbidoul Sep 28, 2025
b3871c6
Add news
sbidoul Sep 27, 2025
6feecc2
Fix and expand PEP 660 detection
sbidoul Sep 28, 2025
893ab4b
Remove a few more obsolete pep517 things from the test suite
sbidoul Sep 29, 2025
5a17132
Docs: reflect removal of direct setup.py invocations
sbidoul Oct 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run unit tests with no build isolation
Some unit test need to run metadata preparation for setuptools based test projects.
  • Loading branch information
sbidoul committed Oct 21, 2025
commit fe02d658f7244c51b64c084f938bcb0804cef82f
2 changes: 1 addition & 1 deletion tests/unit/resolution_resolvelib/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def finder(data: TestData) -> PackageFinder:
def preparer(finder: PackageFinder) -> Iterator[RequirementPreparer]:
session = PipSession()
rc = InstallCommand("x", "y")
o = rc.parse_args([])
o = rc.parse_args(["--no-build-isolation"])

with global_tempdir_manager():
with TempDirectory() as tmp:
Expand Down
19 changes: 11 additions & 8 deletions tests/unit/test_req.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def _basic_resolver(
finder: PackageFinder,
require_hashes: bool = False,
wheel_cache: WheelCache | None = None,
build_isolation: bool = True,
) -> Iterator[Resolver]:
make_install_req = partial(
install_req_from_req_string,
Expand All @@ -103,7 +104,7 @@ def _basic_resolver(
build_dir=os.path.join(self.tempdir, "build"),
src_dir=os.path.join(self.tempdir, "src"),
download_dir=None,
build_isolation=True,
build_isolation=build_isolation,
build_isolation_installer=installer,
check_build_deps=False,
build_tracker=tracker,
Expand Down Expand Up @@ -165,7 +166,7 @@ def test_environment_marker_extras(self, data: TestData) -> None:
req.user_supplied = True
reqset.add_unnamed_requirement(req)
finder = make_test_finder(find_links=[data.find_links])
with self._basic_resolver(finder) as resolver:
with self._basic_resolver(finder, build_isolation=False) as resolver:
reqset = resolver.resolve(reqset.all_requirements, True)
assert not reqset.has_requirement("simple")

Expand Down Expand Up @@ -318,7 +319,9 @@ def test_unhashed_deps_on_require_hashes(self, data: TestData) -> None:
)
)

with self._basic_resolver(finder, require_hashes=True) as resolver:
with self._basic_resolver(
finder, require_hashes=True, build_isolation=False
) as resolver:
with pytest.raises(
HashErrors,
match=(
Expand Down Expand Up @@ -359,7 +362,7 @@ def test_hashed_deps_on_require_hashes(self) -> None:
def test_download_info_find_links(self, data: TestData) -> None:
"""Test that download_info is set for requirements via find_links."""
finder = make_test_finder(find_links=[data.find_links])
with self._basic_resolver(finder) as resolver:
with self._basic_resolver(finder, build_isolation=False) as resolver:
ireq = get_processed_req_from_line("simple")
reqset = resolver.resolve([ireq], True)
assert len(reqset.all_requirements) == 1
Expand All @@ -384,7 +387,7 @@ def test_download_info_index_url(self) -> None:
def test_download_info_web_archive(self) -> None:
"""Test that download_info is set for requirements from a web archive."""
finder = make_test_finder()
with self._basic_resolver(finder) as resolver:
with self._basic_resolver(finder, build_isolation=False) as resolver:
ireq = get_processed_req_from_line(
"pip-test-package @ "
"https://github.com/pypa/pip-test-package/tarball/0.1.1"
Expand Down Expand Up @@ -494,7 +497,7 @@ def test_download_info_local_wheel(self, data: TestData) -> None:
def test_download_info_local_dir(self, data: TestData) -> None:
"""Test that download_info is set for requirements from a local dir."""
finder = make_test_finder()
with self._basic_resolver(finder) as resolver:
with self._basic_resolver(finder, build_isolation=False) as resolver:
ireq_url = data.packages.joinpath("FSPkg").as_uri()
ireq = get_processed_req_from_line(f"FSPkg @ {ireq_url}")
reqset = resolver.resolve([ireq], True)
Expand All @@ -507,7 +510,7 @@ def test_download_info_local_dir(self, data: TestData) -> None:
def test_download_info_local_editable_dir(self, data: TestData) -> None:
"""Test that download_info is set for requirements from a local editable dir."""
finder = make_test_finder()
with self._basic_resolver(finder) as resolver:
with self._basic_resolver(finder, build_isolation=False) as resolver:
ireq_url = data.packages.joinpath("FSPkg").as_uri()
ireq = get_processed_req_from_line(f"-e {ireq_url}#egg=FSPkg")
reqset = resolver.resolve([ireq], True)
Expand All @@ -522,7 +525,7 @@ def test_download_info_local_editable_dir(self, data: TestData) -> None:
def test_download_info_vcs(self) -> None:
"""Test that download_info is set for requirements from git."""
finder = make_test_finder()
with self._basic_resolver(finder) as resolver:
with self._basic_resolver(finder, build_isolation=False) as resolver:
ireq = get_processed_req_from_line(
"pip-test-package @ git+https://github.com/pypa/pip-test-package"
)
Expand Down