summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-07-02 13:02:21 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-07-02 13:02:21 (GMT)
commit5f8aa47e1e386a72bba26c6124c87b808d850c9a (patch)
tree8bf1b933108fbaaa9ae8fa217bdf023569d233b9
parent3f5de1316d125e59dc7be51bde43fe6d87229c55 (diff)
downloadcpython-5f8aa47e1e386a72bba26c6124c87b808d850c9a.zip
cpython-5f8aa47e1e386a72bba26c6124c87b808d850c9a.tar.gz
cpython-5f8aa47e1e386a72bba26c6124c87b808d850c9a.tar.bz2
Merged revisions 73756-73757 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73756 | tarek.ziade | 2009-07-02 14:47:54 +0200 (Thu, 02 Jul 2009) | 1 line raising bdist_dumb test coverage ........ r73757 | tarek.ziade | 2009-07-02 14:51:56 +0200 (Thu, 02 Jul 2009) | 1 line cleaned up the bdist_dumb module ........
-rw-r--r--Lib/distutils/command/bdist_dumb.py5
-rw-r--r--Lib/distutils/tests/test_bdist_dumb.py15
2 files changed, 18 insertions, 2 deletions
diff --git a/Lib/distutils/command/bdist_dumb.py b/Lib/distutils/command/bdist_dumb.py
index 2d39922..63c0a47 100644
--- a/Lib/distutils/command/bdist_dumb.py
+++ b/Lib/distutils/command/bdist_dumb.py
@@ -7,16 +7,17 @@ $exec_prefix)."""
__revision__ = "$Id$"
import os
+
from distutils.core import Command
from distutils.util import get_platform
from distutils.dir_util import remove_tree, ensure_relative
-from distutils.errors import *
+from distutils.errors import DistutilsPlatformError
from distutils.sysconfig import get_python_version
from distutils import log
class bdist_dumb(Command):
- description = "create a \"dumb\" built distribution"
+ description = 'create a "dumb" built distribution'
user_options = [('bdist-dir=', 'd',
"temporary directory for creating the distribution"),
diff --git a/Lib/distutils/tests/test_bdist_dumb.py b/Lib/distutils/tests/test_bdist_dumb.py
index d2ea201..b28f89f 100644
--- a/Lib/distutils/tests/test_bdist_dumb.py
+++ b/Lib/distutils/tests/test_bdist_dumb.py
@@ -71,6 +71,21 @@ class BuildDumbTestCase(support.TempdirManager,
# now let's check what we have in the zip file
# XXX to be done
+ def test_finalize_options(self):
+ pkg_dir, dist = self.create_dist()
+ os.chdir(pkg_dir)
+ cmd = bdist_dumb(dist)
+ self.assertEquals(cmd.bdist_dir, None)
+ cmd.finalize_options()
+
+ # bdist_dir is initialized to bdist_base/dumb if not set
+ base = cmd.get_finalized_command('bdist').bdist_base
+ self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb'))
+
+ # the format is set to a default value depending on the os.name
+ default = cmd.default_format[os.name]
+ self.assertEquals(cmd.format, default)
+
def test_suite():
return unittest.makeSuite(BuildDumbTestCase)