mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 10:26:02 +00:00 
			
		
		
		
	 21d3a32b99
			
		
	
	
		21d3a32b99
		
	
	
	
	
		
			
			and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			510 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			510 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Copyright (C) 2003 Python Software Foundation
 | ||
| 
 | ||
| import unittest
 | ||
| import shutil
 | ||
| import tempfile
 | ||
| from test import test_support
 | ||
| 
 | ||
| class TestShutil(unittest.TestCase):
 | ||
|     def test_rmtree_errors(self):
 | ||
|         # filename is guaranteed not to exist
 | ||
|         filename = tempfile.mktemp()
 | ||
|         self.assertRaises(OSError, shutil.rmtree, filename)
 | ||
|         self.assertEqual(shutil.rmtree(filename, True), None)
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| def test_main():
 | ||
|     test_support.run_unittest(TestShutil)
 | ||
| 
 | ||
| 
 | ||
| if __name__ == '__main__':
 | ||
|     test_main()
 |