diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-09-08 23:03:47 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-09-08 23:03:47 (GMT) |
commit | 74ce88fd67465bf3386b3358aa120e29b75d5353 (patch) | |
tree | 257ca155eeaf490f5fd45a34495d6019b4297190 /Lib | |
parent | 61c001a93942e5afc23d607f84f0ff04d01fc4b4 (diff) | |
download | cpython-74ce88fd67465bf3386b3358aa120e29b75d5353.zip cpython-74ce88fd67465bf3386b3358aa120e29b75d5353.tar.gz cpython-74ce88fd67465bf3386b3358aa120e29b75d5353.tar.bz2 |
Issue #3804: Added test for Issue #2222.
Reviewed by Benjamin Peterson.
Diffstat (limited to 'Lib')
-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 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): |