Commit 308334d6 authored by Hirokazu Yamamoto's avatar Hirokazu Yamamoto

Issue #3804: Added test for Issue #2222.

Reviewed by Benjamin Peterson.
parent 37ab1863
......@@ -23,6 +23,13 @@ class FileTests(unittest.TestCase):
os.close(f)
self.assert_(os.access(test_support.TESTFN, os.W_OK))
def test_rename(self):
path = unicode(test_support.TESTFN)
old = sys.getrefcount(path)
self.assertRaises(TypeError, os.rename, path, 0)
new = sys.getrefcount(path)
self.assertEqual(old, new)
class TemporaryFileTests(unittest.TestCase):
def setUp(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment