blob: 3a39ec9056f4c0fa23e5a934cc44471d0a72314f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  | 
# 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()
  |