[Python-3000] [Python-Dev] Need help fixing failing Py3k Unittests in py3k-struni (original) (raw)

Thomas Heller theller at ctypes.org
Wed Jul 11 22:07:11 CEST 2007


Amaury Forgeot d'Arc schrieb:

Re-hello,

Thomas Heller wrote: > On 7/11/07, Amaury Forgeot d'Arc wrote: >> Thomas Heller wrote: >> > I would love to look into these, but I prefer debugging on Windows. >> > However, the windows build does not work because the fileio builtin >> > module is missing from config.c. Again, this is not so easy to fix, >> > because the ftruncate function does not exist on Windows. >> >> In fileobject.c, there is a replacement for ftruncate. See the code >> around the call to SetEndOfFile(). >> >> I'll try to provide a patch later today.

Awaiting your patch ;-). Ok, here it is; shamelessly copied from fileobject.c.

Amaury, please upload your patches to the SF bug tracker, and assign them to me. I will (hopefully) look into them tomorrow.

BTW, what is the status of this fileobject? open() doesn't seem to use it anymore. Will file() be removed at some point?

Now testfileio passes on Windows, with the exception of testAbles(): since c:\dev is an existing directory on my machine, /dev/tty is a regular file and is seekable... Maybe skip this test on win32? I have a couple of other corrections, found by randomly playing with the tests functions... shall I post the corrections here as well?

See above: posting them to the tracker makes sure they don't get lost.

Thanks, Thomas



More information about the Python-3000 mailing list