The test driver (and ZODB) use buffered I/O, not unbuffered POSIX I/O. Assuring that writes done to buffered streams are visible to other processes is trickier than Martin's reliance on the write(2) man page, since write(2) isn't involved in the chain.
All you need to do is call f.flush(). This calls write(2) internally (even on Windows).
--Guido van Rossum (home page: http://www.python.org/%7Eguido/)