Ticket #1705 defect closed fixed
Test failure on win32 (FilePathTestCase.testGetAndSet)
|Reported by:||teratorn||Owned by:||teratorn|
twisted.test.test_paths.FilePathTestCase.testGetAndSet fails on win32 due to the inconsistent behavior of os.rename across platforms, and is currently marked TODO.
On UNIX os.rename will overwrite the destination in most cases. On win32 it will never overwrite.
FilePath's setContent method relies on overwriting the path with os.rename if it already exists.
Why, exactly, does setContent create a tmp file and move it over the destination instead of just writing the content directly to the destination?