Commit 4c19e6e0 authored by Hirokazu Yamamoto's avatar Hirokazu Yamamoto

Issue #3804: Added test for Issue #2222.

Reviewed by Benjamin Peterson.
parent ae5360b3
......@@ -43,6 +43,13 @@ class FileTests(unittest.TestCase):
os.closerange(first, first + 2)
self.assertRaises(OSError, os.write, first, "a")
def test_rename(self):
path = 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):
self.files = []
......
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