summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStéphane Bidoul (ACSONE) <stephane.bidoul@acsone.eu>2016-05-26 12:41:01 +0200
committerDonald Stufft <donald@stufft.io>2016-05-26 06:41:01 -0400
commit4d1b7984653c4365c101c86b1436703332d79f41 (patch)
treef0006f8483fabf0e69965806c3aaa50ff8ea5424 /tests
parentb15c7f6b6a0ed13e524f1c48bd1693970302eba1 (diff)
downloadpip-4d1b7984653c4365c101c86b1436703332d79f41.tar.gz
Allow creating wheels for editable packages (#3695)
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/test_wheel.py15
-rw-r--r--tests/unit/test_wheel.py10
2 files changed, 15 insertions, 10 deletions
diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py
index b90604238..ac08d4280 100644
--- a/tests/functional/test_wheel.py
+++ b/tests/functional/test_wheel.py
@@ -75,6 +75,21 @@ def test_pip_wheel_builds_editable_deps(script, data):
@pytest.mark.network
+def test_pip_wheel_builds_editable(script, data):
+ """
+ Test 'pip wheel' builds an editable package
+ """
+ script.pip('install', 'wheel')
+ editable_path = os.path.join(data.src, 'simplewheel-1.0')
+ result = script.pip(
+ 'wheel', '--no-index', '-e', editable_path
+ )
+ wheel_file_name = 'simplewheel-1.0-py%s-none-any.whl' % pyversion[0]
+ wheel_file_path = script.scratch / wheel_file_name
+ assert wheel_file_path in result.files_created, result.stdout
+
+
+@pytest.mark.network
def test_pip_wheel_fail(script, data):
"""
Test 'pip wheel' failure.
diff --git a/tests/unit/test_wheel.py b/tests/unit/test_wheel.py
index b6dc1f607..0e030e5bb 100644
--- a/tests/unit/test_wheel.py
+++ b/tests/unit/test_wheel.py
@@ -380,16 +380,6 @@ class TestWheelBuilder(object):
assert "due to already being wheel" in caplog.text()
assert mock_build_one.mock_calls == []
- def test_skip_building_editables(self, caplog):
- with patch('pip.wheel.WheelBuilder._build_one') as mock_build_one:
- editable = Mock(editable=True, is_wheel=False, constraint=False)
- reqset = Mock(requirements=Mock(values=lambda: [editable]),
- wheel_download_dir='/wheel/dir')
- wb = wheel.WheelBuilder(reqset, Mock())
- wb.build()
- assert "due to being editable" in caplog.text()
- assert mock_build_one.mock_calls == []
-
class TestWheelCache: