diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-04-05 22:57:21 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-04-05 22:57:21 (GMT) |
commit | f637050f79c37701fa77dd6e424a5f3338243e81 (patch) | |
tree | a5f5a74f1fe2e7201bf7f88151046557576715ab /Lib/distutils/tests/test_bdist.py | |
parent | 0d8f07305d7ddcf684c3db5680263c98cf70c067 (diff) | |
download | cpython-f637050f79c37701fa77dd6e424a5f3338243e81.zip cpython-f637050f79c37701fa77dd6e424a5f3338243e81.tar.gz cpython-f637050f79c37701fa77dd6e424a5f3338243e81.tar.bz2 |
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
........
Diffstat (limited to 'Lib/distutils/tests/test_bdist.py')
-rw-r--r-- | Lib/distutils/tests/test_bdist.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_bdist.py b/Lib/distutils/tests/test_bdist.py new file mode 100644 index 0000000..f2849a9 --- /dev/null +++ b/Lib/distutils/tests/test_bdist.py @@ -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()) |