"""Tests for distutils.command.bdist_wininst."""frompackaging.command.bdist_wininstimportbdist_wininstfrompackaging.testsimportunittest,supportclassBuildWinInstTestCase(support.TempdirManager,support.LoggingCatcher,unittest.TestCase):deftest_get_exe_bytes(self):# issue5731: command was broken on non-windows platforms# this test makes sure it works now for every platform# let's create a commandpkg_pth,dist=self.create_dist()cmd=bdist_wininst(dist)cmd.ensure_finalized()# let's run the code that finds the right wininst*.exe file# and make sure it finds it and returns its content# no matter what platform we haveexe_file=cmd.get_exe_bytes()self.assertGreater(len(exe_file),10)deftest_suite():returnunittest.makeSuite(BuildWinInstTestCase)if__name__=='__main__':unittest.main(defaultTest='test_suite')