home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / test_shutil.py < prev    next >
Text File  |  2003-12-30  |  510b  |  23 lines

  1. # Copyright (C) 2003 Python Software Foundation
  2.  
  3. import unittest
  4. import shutil
  5. import tempfile
  6. from test import test_support
  7.  
  8. class TestShutil(unittest.TestCase):
  9.     def test_rmtree_errors(self):
  10.         # filename is guaranteed not to exist
  11.         filename = tempfile.mktemp()
  12.         self.assertRaises(OSError, shutil.rmtree, filename)
  13.         self.assertEqual(shutil.rmtree(filename, True), None)
  14.  
  15.  
  16.  
  17. def test_main():
  18.     test_support.run_unittest(TestShutil)
  19.  
  20.  
  21. if __name__ == '__main__':
  22.     test_main()
  23.