From: Hirokazu Yamamoto Date: Mon, 8 Sep 2008 23:41:21 +0000 (+0000) Subject: Issue #3804: Added test for Issue #2222. X-Git-Tag: v3.0rc1~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c19e6e02d4d7bb6d92395276dbf801e12876e24;p=thirdparty%2FPython%2Fcpython.git 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 e9b0652ab0dc..50b583162ed2 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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 = []