Well spotted :) That does seem to be the problem. Adding removal of the .pyc file will make the tests pass.
I guess that python doesn't use the higher resolution timestamp you can get from at least Solaris when doing 'stat' on a file. Thanks for the help. /Mattias On Apr 23, 10:28 pm, Arnaud Delobelle <arno...@googlemail.com> wrote: > > My guess is that without the sleep(1), the imp.load_source function will > use the compiled file 'my_module.pyc' created in test_1 instead of > compiling the new 'my_module.py' file. > > > HTH > > -- > Arnaud -- http://mail.python.org/mailman/listinfo/python-list