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

Side by Side Diff: Lib/distutils/tests/test_install_lib.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_data.""" 1 """Tests for distutils.command.install_data."""
2 import sys 2 import sys
3 import os 3 import os
4 import importlib.util 4 import importlib.util
5 import unittest 5 import unittest
6 6
7 from distutils.command.install_lib import install_lib 7 from distutils.command.install_lib import install_lib
8 from distutils.extension import Extension 8 from distutils.extension import Extension
9 from distutils.tests import support 9 from distutils.tests import support
10 from distutils.errors import DistutilsOptionError 10 from distutils.errors import DistutilsOptionError
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 cmd.compile = 1 98 cmd.compile = 1
99 cmd.optimize = 1 99 cmd.optimize = 1
100 100
101 old_dont_write_bytecode = sys.dont_write_bytecode 101 old_dont_write_bytecode = sys.dont_write_bytecode
102 sys.dont_write_bytecode = True 102 sys.dont_write_bytecode = True
103 try: 103 try:
104 cmd.byte_compile([]) 104 cmd.byte_compile([])
105 finally: 105 finally:
106 sys.dont_write_bytecode = old_dont_write_bytecode 106 sys.dont_write_bytecode = old_dont_write_bytecode
107 107
108 self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) 108 self.assertIn('byte-compiling is disabled', self.logs[0][1])
109 109
110 110
111 def test_suite(): 111 def test_suite():
112 return unittest.makeSuite(InstallLibTestCase) 112 return unittest.makeSuite(InstallLibTestCase)
113 113
114 if __name__ == "__main__": 114 if __name__ == "__main__":
115 run_unittest(test_suite()) 115 run_unittest(test_suite())
OLDNEW

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