diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-01-29 23:51:53 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-01-29 23:51:53 (GMT) |
commit | e2bd0d1620166d91ec0ff5ec46a938b4937244c6 (patch) | |
tree | d3714aef3388035be5089f921af6b9e8089c7040 /Lib | |
parent | 4ad77e25502b8a9547b3590465bd842a4fb068fb (diff) | |
download | cpython-e2bd0d1620166d91ec0ff5ec46a938b4937244c6.zip cpython-e2bd0d1620166d91ec0ff5ec46a938b4937244c6.tar.gz cpython-e2bd0d1620166d91ec0ff5ec46a938b4937244c6.tar.bz2 |
Merged revisions 69106 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69106 | tarek.ziade | 2009-01-30 00:49:17 +0100 (Fri, 30 Jan 2009) | 1 line
fixed test_make_distribution so it runs on any platform, as long as tar an gzip are available
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/tests/test_sdist.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py index 96ec381..0d839b5 100644 --- a/Lib/distutils/tests/test_sdist.py +++ b/Lib/distutils/tests/test_sdist.py @@ -10,7 +10,7 @@ from distutils.command.sdist import sdist from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError -from distutils.spawn import spawn +from distutils.spawn import find_executable CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -111,15 +111,12 @@ class sdistTestCase(PyPIRCCommandTestCase): def test_make_distribution(self): - self._init_tmp_pkg() + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return - # check if tar is installed under win32 - if sys.platform == 'win32': - try: - spawn('tar --help') - except DistutilsExecError: - # let's return, no need to go further - return + self._init_tmp_pkg() # now building a sdist dist = Distribution() |