ยปCore Development>Code coverage>Lib/packaging/tests/test_command_bdist_wininst.py

Python code coverage for Lib/packaging/tests/test_command_bdist_wininst.py

#countcontent
1n/a"""Tests for distutils.command.bdist_wininst."""
2n/a
3n/afrom packaging.command.bdist_wininst import bdist_wininst
4n/afrom packaging.tests import unittest, support
5n/a
6n/a
7n/aclass BuildWinInstTestCase(support.TempdirManager,
8n/a support.LoggingCatcher,
9n/a unittest.TestCase):
10n/a
11n/a def test_get_exe_bytes(self):
12n/a
13n/a # issue5731: command was broken on non-windows platforms
14n/a # this test makes sure it works now for every platform
15n/a # let's create a command
16n/a pkg_pth, dist = self.create_dist()
17n/a cmd = bdist_wininst(dist)
18n/a cmd.ensure_finalized()
19n/a
20n/a # let's run the code that finds the right wininst*.exe file
21n/a # and make sure it finds it and returns its content
22n/a # no matter what platform we have
23n/a exe_file = cmd.get_exe_bytes()
24n/a self.assertGreater(len(exe_file), 10)
25n/a
26n/a
27n/adef test_suite():
28n/a return unittest.makeSuite(BuildWinInstTestCase)
29n/a
30n/a
31n/aif __name__ == '__main__':
32n/a unittest.main(defaultTest='test_suite')