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
........
This commit is contained in:
Tarek Ziadé 2009-01-29 23:51:53 +00:00
parent 4ad77e2550
commit e2bd0d1620
1 changed files with 6 additions and 9 deletions

View File

@ -10,7 +10,7 @@ from distutils.command.sdist import sdist
from distutils.core import Distribution from distutils.core import Distribution
from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.tests.test_config import PyPIRCCommandTestCase
from distutils.errors import DistutilsExecError from distutils.errors import DistutilsExecError
from distutils.spawn import spawn from distutils.spawn import find_executable
CURDIR = os.path.dirname(__file__) CURDIR = os.path.dirname(__file__)
TEMP_PKG = join(CURDIR, 'temppkg') TEMP_PKG = join(CURDIR, 'temppkg')
@ -111,15 +111,12 @@ class sdistTestCase(PyPIRCCommandTestCase):
def test_make_distribution(self): 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 self._init_tmp_pkg()
if sys.platform == 'win32':
try:
spawn('tar --help')
except DistutilsExecError:
# let's return, no need to go further
return
# now building a sdist # now building a sdist
dist = Distribution() dist = Distribution()