Skip to content

Commit

Permalink
Implement functional test for installing PEP 517 packages with --no-b…
Browse files Browse the repository at this point in the history
…inary :all:
  • Loading branch information
seppeljordan committed Sep 25, 2019
1 parent 4879c8b commit be6e198
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/data/packages/pep517_setup_and_pyproject/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = [ "setuptools" ]
build-backend = "setuptools.build_meta"
3 changes: 3 additions & 0 deletions tests/data/packages/pep517_setup_and_pyproject/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[metadata]
name = pep517-setup-and-pyproject
version = 1.0
3 changes: 3 additions & 0 deletions tests/data/packages/pep517_setup_and_pyproject/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from setuptools import setup

setup()
17 changes: 17 additions & 0 deletions tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,23 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel):
assert "Running setup.py install for upper" in str(res), str(res)


def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
to_install = data.packages.joinpath('pep517_setup_and_pyproject')
res = script.pip(
'install', '--no-binary=:all:', '-f', data.find_links, to_install
)
expected = ("Successfully installed pep517-setup-and-pyproject")
# Must have installed the package
assert expected in str(res), str(res)

assert "Building wheel for pep517-setup-and-pyproject" in str(res), str(res)
assert (
"Running setup.py install for pep517-setup-and-pyproject" \
not in str(res),
str(res)
)


def test_install_no_binary_disables_cached_wheels(script, data, with_wheel):
# Seed the cache
script.pip(
Expand Down

0 comments on commit be6e198

Please sign in to comment.