]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist_wininst.py
69a3f7fdb5e52bb14fff2c202b991205f6c02be1
1 """Tests for distutils.command.bdist_wininst."""
4 from test
.test_support
import run_unittest
6 from distutils
.command
.bdist_wininst
import bdist_wininst
7 from distutils
.tests
import support
9 class BuildWinInstTestCase(support
.TempdirManager
,
10 support
.LoggingSilencer
,
13 def test_get_exe_bytes(self
):
15 # issue5731: command was broken on non-windows platforms
16 # this test makes sure it works now for every platform
17 # let's create a command
18 pkg_pth
, dist
= self
.create_dist()
19 cmd
= bdist_wininst(dist
)
20 cmd
.ensure_finalized()
22 # let's run the code that finds the right wininst*.exe file
23 # and make sure it finds it and returns its content
24 # no matter what platform we have
25 exe_file
= cmd
.get_exe_bytes()
26 self
.assertTrue(len(exe_file
) > 10)
29 return unittest
.makeSuite(BuildWinInstTestCase
)
31 if __name__
== '__main__':
32 run_unittest(test_suite())