diff options
| author | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-05-30 20:34:33 +0300 |
|---|---|---|
| committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-07-17 15:02:50 +0300 |
| commit | 353217fb496d61b3c5ce287b9c61a229e2ed27fe (patch) | |
| tree | 13245d5b0c891aa40860531c8b23c45e8b210265 /tests | |
| parent | f211d9a8879d44c967cde866ce3da7cad3db7bf4 (diff) | |
| download | wheel-git-353217fb496d61b3c5ce287b9c61a229e2ed27fe.tar.gz | |
Removed the "wheel install" and "wheel installscripts" commands
Closes #46. Closes #48. Closes #90. Closes #197.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_install.py | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/tests/test_install.py b/tests/test_install.py index 97c510b..aee57cd 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -13,23 +13,13 @@ # So, some in PLATLIB, and one in each of DATA, HEADERS and SCRIPTS. import os -import shutil -from distutils.command.install import SCHEME_KEYS -from tempfile import mkdtemp -import wheel.pep425tags -import wheel.tool -from wheel.install import WheelFile, get_install_paths +from wheel.install import WheelFile THISDIR = os.path.dirname(__file__) TESTWHEEL = os.path.join(THISDIR, 'test-1.0-py2.py3-none-win32.whl') -def test_path(): - d = get_install_paths('wheel') - assert len(d) == len(SCHEME_KEYS) - - def test_compatibility_tags(): """Test compatibilty tags are working.""" wf = WheelFile("package-1.0.0-cp32.cp33-noabi-noarch.whl") @@ -75,39 +65,6 @@ def test_pick_best(): # list(map(get_tags, pick_best(cand_wheels, supp, top=False))), supp) -def test_install(): - def check(*path): - return os.path.exists(os.path.join(*path)) - - def get_supported(): - return list(wheel.pep425tags.get_supported()) + [('py3', 'none', 'win32')] - - tempdir = mkdtemp() - whl = WheelFile(TESTWHEEL, context=get_supported) - assert whl.supports_current_python(get_supported) - try: - locs = {} - for key in ('purelib', 'platlib', 'scripts', 'headers', 'data'): - locs[key] = os.path.join(tempdir, key) - os.mkdir(locs[key]) - whl.install(overrides=locs) - assert len(os.listdir(locs['purelib'])) == 0 - assert check(locs['platlib'], 'hello.pyd') - assert check(locs['platlib'], 'hello', 'hello.py') - assert check(locs['platlib'], 'hello', '__init__.py') - assert check(locs['data'], 'hello.dat') - assert check(locs['headers'], 'hello.dat') - assert check(locs['scripts'], 'hello.sh') - assert check(locs['platlib'], 'test-1.0.dist-info', 'RECORD') - finally: - shutil.rmtree(tempdir) - - -def test_install_tool(): - """Slightly improve coverage of wheel.install""" - wheel.tool.install([TESTWHEEL], force=True, dry_run=True) - - def test_wheelfile_re(): # Regression test for #208 wf = WheelFile('foo-2-py3-none-any.whl') |
