diff options
| author | xoviat <xoviat@users.noreply.github.com> | 2017-09-03 22:16:34 -0500 |
|---|---|---|
| committer | xoviat <xoviat@users.noreply.github.com> | 2017-09-07 21:42:07 -0500 |
| commit | 12d4fba61cb8a8533566dafdae8874b617aaedbd (patch) | |
| tree | 916ee7ef511ee8bd022fc920321118950c4099ab /setuptools/tests | |
| parent | 33546858db9b960be11c384f608528b127ca7923 (diff) | |
| download | external_python_setuptools-12d4fba61cb8a8533566dafdae8874b617aaedbd.tar.gz external_python_setuptools-12d4fba61cb8a8533566dafdae8874b617aaedbd.tar.bz2 external_python_setuptools-12d4fba61cb8a8533566dafdae8874b617aaedbd.zip | |
tests: add build_wheel and build_sdist
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/test_pep517.py | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index fd0a1965..0dd38b1b 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -28,7 +28,8 @@ class BuildBackend(object): def method(*args, **kw): return self.pool.submit( - BuildBackendCaller(self.cwd, self.env, self.backend_name), + BuildBackendCaller(os.path.abspath(self.cwd), self.env, + self.backend_name), (name, args, kw)).result() return method @@ -66,7 +67,7 @@ def build_backend(): setup( name='foo', py_modules=['hello'], - setup_requires=['test-package'], + setup_requires=['six'], entry_points={'console_scripts': ['hi = hello.run']}, zip_safe=False, ) @@ -86,4 +87,21 @@ def build_backend(): def test_get_requires_for_build_wheel(build_backend): with build_backend as b: assert list(sorted(b.get_requires_for_build_wheel())) == \ - list(sorted(['test-package', 'setuptools', 'wheel'])) + list(sorted(['six', 'setuptools', 'wheel'])) + +def test_build_wheel(build_backend): + with build_backend as b: + dist_dir = os.path.abspath('pip-wheel') + os.makedirs(dist_dir) + wheel_name = b.build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, wheel_name)) + + +def test_build_sdist(build_backend): + with build_backend as b: + dist_dir = os.path.abspath('pip-sdist') + os.makedirs(dist_dir) + sdist_name = b.build_sdist(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, sdist_name))
\ No newline at end of file |
