On Mar, 02 2009 at 00:13AM, Amaury Forgeot d'Arc <amaur...@gmail.com> wrote:
> Hello, > > On Sun, Mar 1, 2009 at 23:04, Cesare Di Mauro <cesare.dima...@a-tono.com> > wrote: >> Running the test suite with Python 2.6.1 32 bit (compiled in DEBUG mode >> with Visual Studio Express Edition 2008) on Vista x64, I've got an assert >> error: >> >> test_1686475 (__main__.StatAttributeTests) ... Assertion failed: >> (__int64)(int)((in / 10000000) - secs_between_epochs) == ((in / 10000000) >> - secs_between_epochs), file ..\Modules\posixmodule.c, line 790 >> >> I have no idea about this failure. Any hint? > > The failing assertion comes from this code in posixmodule.c: > > /* XXX Win32 supports time stamps past 2038; we currently don't */ > *time_out = Py_SAFE_DOWNCAST((in / 10000000) - secs_between_epochs, > __int64, int); > > the test (btw, it's in test_os.py) is trying > os.stat(r"c:\pagefile.sys") > > Can you please check the three time stamps of this file (creation, > update, access)? > You are right. The last modified timestamp had 2099 as year value (the maximum that I can set on Windows), because of some tests with dates which I made at the time. However, they are correct timestamps for Windows files, so I think that at least the API on posixmodule.c should not fail when working with them. I don't know if there's a way to handle them correctly. Also may be that test_os.py need to be changed in some way, because the pagefile can be put in any partition, and there are Windows installations which lack it, because the virtual memory can be disabled too. Cheers Cesare _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com