These files are a subset of the python-2.7.2.tgz distribution from python.org. Changed files from PyMod-2.7.2 have been copied into the corresponding directories of this tree, replacing the original files in the distribution. Signed-off-by: daryl.mcdaniel@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13197 6f19259b-4bc3-4df7-8a09-765794883524
		
			
				
	
	
		
			26 lines
		
	
	
		
			816 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			816 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """Tests for distutils.util."""
 | |
| import sys
 | |
| import unittest
 | |
| from test.test_support import run_unittest
 | |
| 
 | |
| from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError
 | |
| from distutils.util import byte_compile
 | |
| 
 | |
| class UtilTestCase(unittest.TestCase):
 | |
| 
 | |
|     def test_dont_write_bytecode(self):
 | |
|         # makes sure byte_compile raise a DistutilsError
 | |
|         # if sys.dont_write_bytecode is True
 | |
|         old_dont_write_bytecode = sys.dont_write_bytecode
 | |
|         sys.dont_write_bytecode = True
 | |
|         try:
 | |
|             self.assertRaises(DistutilsByteCompileError, byte_compile, [])
 | |
|         finally:
 | |
|             sys.dont_write_bytecode = old_dont_write_bytecode
 | |
| 
 | |
| def test_suite():
 | |
|     return unittest.makeSuite(UtilTestCase)
 | |
| 
 | |
| if __name__ == "__main__":
 | |
|     run_unittest(test_suite())
 |