[Python-checkins] r66318 - python/branches/release25-maint/Lib/test/test_os.py

hirokazu.yamamoto python-checkins at python.org
Tue Sep 9 01:10:08 CEST 2008


Author: hirokazu.yamamoto
Date: Tue Sep 9 01:10:08 2008
New Revision: 66318
Log:
Issue #3804: Added test for Issue #2222.
Reviewed by Benjamin Peterson.
Modified:
 python/branches/release25-maint/Lib/test/test_os.py
Modified: python/branches/release25-maint/Lib/test/test_os.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_os.py	(original)
+++ python/branches/release25-maint/Lib/test/test_os.py	Tue Sep 9 01:10:08 2008
@@ -23,6 +23,13 @@
 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):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /