2003-01-24 13:34:13 -04:00
|
|
|
|
# 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():
|
2003-05-01 14:45:56 -03:00
|
|
|
|
test_support.run_unittest(TestShutil)
|
2003-01-24 13:34:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2003-05-01 14:45:56 -03:00
|
|
|
|
test_main()
|