blob: 3a39ec9056f4c0fa23e5a934cc44471d0a72314f [file] [log] [blame]
Barry Warsaw7fc2cca2003-01-24 17:34:13 +00001# Copyright (C) 2003 Python Software Foundation
2
3import unittest
4import shutil
5import tempfile
6from test import test_support
7
8class 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
Barry Warsaw7fc2cca2003-01-24 17:34:13 +000017def test_main():
Walter Dörwald21d3a322003-05-01 17:45:56 +000018 test_support.run_unittest(TestShutil)
Barry Warsaw7fc2cca2003-01-24 17:34:13 +000019
20
21if __name__ == '__main__':
Walter Dörwald21d3a322003-05-01 17:45:56 +000022 test_main()