diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-09-08 23:41:21 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-09-08 23:41:21 (GMT) |
commit | 4c19e6e02d4d7bb6d92395276dbf801e12876e24 (patch) | |
tree | 982b2664a6901af418dd8a2b2a0c480095675b1b /Lib/test/test_os.py | |
parent | ae5360b31eb9bc78de48dd263f07ff247f86213a (diff) | |
download | cpython-4c19e6e02d4d7bb6d92395276dbf801e12876e24.zip cpython-4c19e6e02d4d7bb6d92395276dbf801e12876e24.tar.gz cpython-4c19e6e02d4d7bb6d92395276dbf801e12876e24.tar.bz2 |
Issue #3804: Added test for Issue #2222.
Reviewed by Benjamin Peterson.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index e9b0652..50b5831 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 = [] |