Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Delta Between Two Patch Sets: Lib/distutils/tests/test_bdist.py

Issue 3871: cross and native build of python for mingw32 with distutils
Left Patch Set: Created 9 years, 5 months ago
Right Patch Set: Created 7 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/distutils/tests/test_bdist_msi.py ('k') | Lib/distutils/tests/test_config_cmd.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 """Tests for distutils.command.bdist.""" 1 """Tests for distutils.command.bdist."""
2 import os 2 import os
3 import unittest 3 import unittest
4 from test.support import run_unittest 4 from test.support import run_unittest
5 5
6 from distutils.command.bdist import bdist 6 from distutils.command.bdist import bdist
7 from distutils.tests import support 7 from distutils.tests import support
8 8
9 9
10 class BuildTestCase(support.TempdirManager, 10 class BuildTestCase(support.TempdirManager,
(...skipping 17 matching lines...) Expand all
28 def test_skip_build(self): 28 def test_skip_build(self):
29 # bug #10946: bdist --skip-build should trickle down to subcommands 29 # bug #10946: bdist --skip-build should trickle down to subcommands
30 dist = self.create_dist()[1] 30 dist = self.create_dist()[1]
31 cmd = bdist(dist) 31 cmd = bdist(dist)
32 cmd.skip_build = 1 32 cmd.skip_build = 1
33 cmd.ensure_finalized() 33 cmd.ensure_finalized()
34 dist.command_obj['bdist'] = cmd 34 dist.command_obj['bdist'] = cmd
35 35
36 names = ['bdist_dumb', 'bdist_wininst'] # bdist_rpm does not support -- skip-build 36 names = ['bdist_dumb', 'bdist_wininst'] # bdist_rpm does not support -- skip-build
37 if os.name == 'nt': 37 if os.name == 'nt':
38 names.append('bdist_msi') 38 try:
39 dist.get_command_obj('bdist_msi')
40 names.append('bdist_msi')
41 except:
42 pass
39 43
40 for name in names: 44 for name in names:
41 subcmd = cmd.get_finalized_command(name) 45 subcmd = cmd.get_finalized_command(name)
42 self.assertTrue(subcmd.skip_build, 46 self.assertTrue(subcmd.skip_build,
43 '%s should take --skip-build from bdist' % name) 47 '%s should take --skip-build from bdist' % name)
44 48
45 49
46 def test_suite(): 50 def test_suite():
47 return unittest.makeSuite(BuildTestCase) 51 return unittest.makeSuite(BuildTestCase)
48 52
49 if __name__ == '__main__': 53 if __name__ == '__main__':
50 run_unittest(test_suite()) 54 run_unittest(test_suite())
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+