From: Hirokazu Yamamoto Date: Mon, 8 Sep 2008 23:10:08 +0000 (+0000) Subject: Issue #3804: Added test for Issue #2222. X-Git-Tag: v2.5.3c1~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=308334d6a483b3f2cd0a02837f9af2b141d46c30;p=python Issue #3804: Added test for Issue #2222. Reviewed by Benjamin Peterson. --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 26c5482b30..741224c6fc 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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):