Skip to content

Commit

Permalink
Add editable+pep517 tests for should_build / should_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jul 19, 2020
1 parent d89d8c6 commit 812fb46
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/unit/test_wheel_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def __init__(
(ReqMock(), True, False),
(ReqMock(constraint=True), False, False),
(ReqMock(is_wheel=True), False, False),
(ReqMock(editable=True), False, False),
(ReqMock(editable=True, use_pep517=False), False, False),
(ReqMock(editable=True, use_pep517=True), False, True),
(ReqMock(source_dir=None), False, False),
# By default (i.e. when binaries are allowed), VCS requirements
# should be built in install mode.
Expand All @@ -80,7 +81,8 @@ def test_should_build_for_install_command(req, disallow_binaries, expected):
(ReqMock(), True),
(ReqMock(constraint=True), False),
(ReqMock(is_wheel=True), False),
(ReqMock(editable=True), True),
(ReqMock(editable=True, use_pep517=False), True),
(ReqMock(editable=True, use_pep517=True), True),
(ReqMock(source_dir=None), True),
(ReqMock(link=Link("git+https://g.c/org/repo")), True),
],
Expand Down Expand Up @@ -115,7 +117,8 @@ def test_should_build_legacy_wheel_installed(is_wheel_installed):
@pytest.mark.parametrize(
"req, expected",
[
(ReqMock(editable=True), False),
(ReqMock(editable=True, use_pep517=False), False),
(ReqMock(editable=True, use_pep517=True), False),
(ReqMock(source_dir=None), False),
(ReqMock(link=Link("git+https://g.c/org/repo")), False),
(ReqMock(link=Link("https://g.c/dist.tgz")), False),
Expand Down

0 comments on commit 812fb46

Please sign in to comment.