From 74ce88fd67465bf3386b3358aa120e29b75d5353 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 8 Sep 2008 23:03:47 +0000 Subject: Issue #3804: Added test for Issue #2222. Reviewed by Benjamin Peterson. --- Lib/test/test_os.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index a618af4..583df2b 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -47,6 +47,13 @@ class FileTests(unittest.TestCase): os.closerange(first, first + 2) self.assertRaises(OSError, os.write, first, "a") + 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): -- cgit v0.12