Hello, Thanks for all the great ideas. Based on your input, I was able to solve my problem by way of a FakeDate in a fakedate module.
In the testing module, before importing the tested module, I would load my fakedate module into sys.modules under the key 'datetime'. So when the tested module is imported, it will get my fakedate module in stead of the original C-extension datetime module. That way, the tested module needs no modification. -- Hong Yuan 大管家网上建材超市 装修装潢建材一站式购物 http://www.homemaster.cn
-- http://mail.python.org/mailman/listinfo/python-list