Hello,<br><br>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.<br><br>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.<br clear="all">
<br>That way, the tested module needs no modification.<br><br>-- <br>Hong Yuan<br><br>大管家网上建材超市<br>装修装潢建材一站式购物<br><a href="http://www.homemaster.cn">http://www.homemaster.cn</a><br>