mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Merged revisions 71291 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71291 | tarek.ziade | 2009-04-06 00:51:09 +0200 (Mon, 06 Apr 2009) | 1 line Fixed #5095: msi missing from Distutils bdist formats ........
This commit is contained in:
parent
0d8f07305d
commit
f637050f79
4 changed files with 67 additions and 25 deletions
43
Lib/distutils/tests/test_bdist.py
Normal file
43
Lib/distutils/tests/test_bdist.py
Normal file
|
@ -0,0 +1,43 @@
|
|||
"""Tests for distutils.command.bdist."""
|
||||
import unittest
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
import shutil
|
||||
|
||||
from distutils.core import Distribution
|
||||
from distutils.command.bdist import bdist
|
||||
from distutils.tests import support
|
||||
from distutils.spawn import find_executable
|
||||
from distutils import spawn
|
||||
from distutils.errors import DistutilsExecError
|
||||
|
||||
class BuildTestCase(support.TempdirManager,
|
||||
unittest.TestCase):
|
||||
|
||||
def test_formats(self):
|
||||
|
||||
# let's create a command and make sure
|
||||
# we can fix the format
|
||||
pkg_pth, dist = self.create_dist()
|
||||
cmd = bdist(dist)
|
||||
cmd.formats = ['msi']
|
||||
cmd.ensure_finalized()
|
||||
self.assertEquals(cmd.formats, ['msi'])
|
||||
|
||||
# what format bdist offers ?
|
||||
# XXX an explicit list in bdist is
|
||||
# not the best way to bdist_* commands
|
||||
# we should add a registry
|
||||
formats = ['rpm', 'zip', 'gztar', 'bztar', 'ztar',
|
||||
'tar', 'wininst', 'msi']
|
||||
formats.sort()
|
||||
founded = list(cmd.format_command.keys())
|
||||
founded.sort()
|
||||
self.assertEquals(founded, formats)
|
||||
|
||||
def test_suite():
|
||||
return unittest.makeSuite(BuildTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
Loading…
Add table
Add a link
Reference in a new issue