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

Side by Side Diff: Lib/distutils/tests/test_install.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.install.""" 1 """Tests for distutils.command.install."""
2 2
3 import os 3 import os
4 import sys 4 import sys
5 import unittest 5 import unittest
6 import site 6 import site
7 7
8 from test.support import captured_stdout, run_unittest 8 from test.support import captured_stdout, run_unittest
9 9
10 from distutils import sysconfig 10 from distutils import sysconfig
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 def test_debug_mode(self): 230 def test_debug_mode(self):
231 # this covers the code called when DEBUG is set 231 # this covers the code called when DEBUG is set
232 old_logs_len = len(self.logs) 232 old_logs_len = len(self.logs)
233 install_module.DEBUG = True 233 install_module.DEBUG = True
234 try: 234 try:
235 with captured_stdout(): 235 with captured_stdout():
236 self.test_record() 236 self.test_record()
237 finally: 237 finally:
238 install_module.DEBUG = False 238 install_module.DEBUG = False
239 self.assertTrue(len(self.logs) > old_logs_len) 239 self.assertGreater(len(self.logs), old_logs_len)
240 240
241 241
242 def test_suite(): 242 def test_suite():
243 return unittest.makeSuite(InstallTestCase) 243 return unittest.makeSuite(InstallTestCase)
244 244
245 if __name__ == "__main__": 245 if __name__ == "__main__":
246 run_unittest(test_suite()) 246 run_unittest(test_suite())
OLDNEW

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