[issue9315] The trace module lacks unit tests

Eli Bendersky report at bugs.python.org
Mon Aug 2 05:05:15 CEST 2010


Eli Bendersky <eliben at gmail.com> added the comment:

I understand you, Alexander, but this problem (as is the previous) **doesn't have anything to do with the fake module**. 

It would happen even if I didn't have it. Why does it only strike this test, then? Because of my usage of __file__ to compare expected results with what trace.py gives. I believe this problem can be solved with fairly simple means, but replacing the fake module by a real module won't solve it.

The fake module was the least intrusive way I could think of to simulate stuff for trace.py - it's a scalable approach if I'll need more than one module in the future for some stress-testing. I haven't run into serious problems with this approach yet - the module is built dynamically, its attributes assigned as I need them, and that's all. Indistinguishable from a real module. This is what we love about Python's reflective properties :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9315>
_______________________________________


More information about the Python-bugs-list mailing list