Discussion:
[Python-3000-checkins] r66320 - python/branches/py3k/Lib/test/test_os.py
hirokazu.yamamoto
2008-09-08 23:41:49 UTC
Permalink
Author: hirokazu.yamamoto
Date: Tue Sep 9 01:41:21 2008
New Revision: 66320

Log:
Issue #3804: Added test for Issue #2222.
Reviewed by Benjamin Peterson.

Modified:
python/branches/py3k/Lib/test/test_os.py

Modified: python/branches/py3k/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k/Lib/test/test_os.py (original)
+++ python/branches/py3k/Lib/test/test_os.py Tue Sep 9 01:41:21 2008
@@ -43,6 +43,13 @@
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 = []

Loading...