1 """Tests for distutils.command.bdist_wininst."""
4 from distutils
.command
.bdist_wininst
import bdist_wininst
5 from distutils
.tests
import support
7 class BuildWinInstTestCase(support
.TempdirManager
,
8 support
.LoggingSilencer
,
11 def test_get_exe_bytes(self
):
13 # issue5731: command was broken on non-windows platforms
14 # this test makes sure it works now for every platform
15 # let's create a command
16 pkg_pth
, dist
= self
.create_dist()
17 cmd
= bdist_wininst(dist
)
18 cmd
.ensure_finalized()
20 # let's run the code that finds the right wininst*.exe file
21 # and make sure it finds it and returns its content
22 # no matter what platform we have
23 exe_file
= cmd
.get_exe_bytes()
24 self
.assertTrue(len(exe_file
) > 10)
27 return unittest
.makeSuite(BuildWinInstTestCase
)
29 if __name__
== '__main__':
30 test_support
.run_unittest(test_suite())