Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f8aa47

Browse files
author
Tarek Ziadé
committed
Merged revisions 73756-73757 via svnmerge from
svn+ssh://[email protected]/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 ........
1 parent 3f5de13 commit 5f8aa47

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Lib/distutils/command/bdist_dumb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
__revision__ = "$Id$"
88

99
import os
10+
1011
from distutils.core import Command
1112
from distutils.util import get_platform
1213
from distutils.dir_util import remove_tree, ensure_relative
13-
from distutils.errors import *
14+
from distutils.errors import DistutilsPlatformError
1415
from distutils.sysconfig import get_python_version
1516
from distutils import log
1617

1718
class bdist_dumb(Command):
1819

19-
description = "create a \"dumb\" built distribution"
20+
description = 'create a "dumb" built distribution'
2021

2122
user_options = [('bdist-dir=', 'd',
2223
"temporary directory for creating the distribution"),

Lib/distutils/tests/test_bdist_dumb.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ def test_simple_built(self):
7171
# now let's check what we have in the zip file
7272
# XXX to be done
7373

74+
def test_finalize_options(self):
75+
pkg_dir, dist = self.create_dist()
76+
os.chdir(pkg_dir)
77+
cmd = bdist_dumb(dist)
78+
self.assertEquals(cmd.bdist_dir, None)
79+
cmd.finalize_options()
80+
81+
# bdist_dir is initialized to bdist_base/dumb if not set
82+
base = cmd.get_finalized_command('bdist').bdist_base
83+
self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb'))
84+
85+
# the format is set to a default value depending on the os.name
86+
default = cmd.default_format[os.name]
87+
self.assertEquals(cmd.format, default)
88+
7489
def test_suite():
7590
return unittest.makeSuite(BuildDumbTestCase)
7691

0 commit comments

Comments
 (0)