Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 59874c0197d3eeeda9abb170dbd86a42faa002fb authored by cvs2svn on 19 December 2003, 02:06:06 UTC
This commit was manufactured by cvs2svn to create tag 'r233'.
Tip revision: 59874c0
test_shutil.py
# 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()
back to top