]> git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist_wininst.py
69a3f7fdb5e52bb14fff2c202b991205f6c02be1
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / distutils / tests / test_bdist_wininst.py
1 """Tests for distutils.command.bdist_wininst."""
2 import unittest
3
4 from test.test_support import run_unittest
5
6 from distutils.command.bdist_wininst import bdist_wininst
7 from distutils.tests import support
8
9 class BuildWinInstTestCase(support.TempdirManager,
10 support.LoggingSilencer,
11 unittest.TestCase):
12
13 def test_get_exe_bytes(self):
14
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()
21
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)
27
28 def test_suite():
29 return unittest.makeSuite(BuildWinInstTestCase)
30
31 if __name__ == '__main__':
32 run_unittest(test_suite())