Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(29934)

Side by Side Diff: Lib/distutils/tests/test_bdist_wininst.py

Issue 19600: Use specific asserts in distutils tests
Patch Set: Created 5 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 """Tests for distutils.command.bdist_wininst.""" 1 """Tests for distutils.command.bdist_wininst."""
2 import unittest 2 import unittest
3 from test.support import run_unittest 3 from test.support import run_unittest
4 4
5 from distutils.command.bdist_wininst import bdist_wininst 5 from distutils.command.bdist_wininst import bdist_wininst
6 from distutils.tests import support 6 from distutils.tests import support
7 7
8 class BuildWinInstTestCase(support.TempdirManager, 8 class BuildWinInstTestCase(support.TempdirManager,
9 support.LoggingSilencer, 9 support.LoggingSilencer,
10 unittest.TestCase): 10 unittest.TestCase):
11 11
12 def test_get_exe_bytes(self): 12 def test_get_exe_bytes(self):
13 13
14 # issue5731: command was broken on non-windows platforms 14 # issue5731: command was broken on non-windows platforms
15 # this test makes sure it works now for every platform 15 # this test makes sure it works now for every platform
16 # let's create a command 16 # let's create a command
17 pkg_pth, dist = self.create_dist() 17 pkg_pth, dist = self.create_dist()
18 cmd = bdist_wininst(dist) 18 cmd = bdist_wininst(dist)
19 cmd.ensure_finalized() 19 cmd.ensure_finalized()
20 20
21 # let's run the code that finds the right wininst*.exe file 21 # let's run the code that finds the right wininst*.exe file
22 # and make sure it finds it and returns its content 22 # and make sure it finds it and returns its content
23 # no matter what platform we have 23 # no matter what platform we have
24 exe_file = cmd.get_exe_bytes() 24 exe_file = cmd.get_exe_bytes()
25 self.assertTrue(len(exe_file) > 10) 25 self.assertGreater(len(exe_file), 10)
26 26
27 def test_suite(): 27 def test_suite():
28 return unittest.makeSuite(BuildWinInstTestCase) 28 return unittest.makeSuite(BuildWinInstTestCase)
29 29
30 if __name__ == '__main__': 30 if __name__ == '__main__':
31 run_unittest(test_suite()) 31 run_unittest(test_suite())
OLDNEW

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+