Hi Andrea,<div><br></div><div>Since you seem to have receive any response at all I&#39;ll pitch in my 5 cents;</div><div><br></div><div>First off, pep8 states that &quot;private&quot; functions should be prepended with an underscore. Using this style could make things like this much simpler - you would only have to worry about public functions. But maybe you already do this...</div>




<div><br></div><div>That said, depending on Python version you are targetting you could use importlib[1,2] to create your own module importer that wraps the real module using <a href="http://www.voidspace.org.uk/python/mock/" target="_blank">Mock</a>, or similar.</div>


<div><br></div><div>[1] <a href="http://pypi.python.org/pypi/importlib/" target="_blank">http://pypi.python.org/pypi/importlib/</a></div><div>[2] <a href="http://docs.python.org/dev/library/importlib.html" target="_blank">http://docs.python.org/dev/library/importlib.html</a></div>


<div><div><br></div><div>Cheers,</div><div>Jens</div><div><br><div class="gmail_quote">On Mon, Aug 20, 2012 at 5:18 PM, andrea crotti <span dir="ltr">&lt;<a href="mailto:andrea.crotti.0@gmail.com" target="_blank">andrea.crotti.0@gmail.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have one &quot;common&quot; project that contains a lot of code which is useful<br>
from more different projects.<br>
<br>
All projects have (hopefully) unit tests, but what I&#39;m worried about now<br>
is that changing a function signature in *common* might make break<br>
something somewhere else.<br>
<br>
This is a common problem I guess, and I could use something like pylint<br>
maybe..<br>
<br>
But even better, if I&#39;m able to<br>
- automatically mock every &quot;common&quot; import, using as a spec the real one<br>
- check that every function call has the right arguments<br>
<br>
it would be even better I think..<br>
Is that possible or is there another better way?<br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><font color="#999999">Want to know how full my inbox is? Or how to get in touch with me faster? Or tell me your e-mail is not that important? Then check this out: <span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><a href="http://courteous.ly/4WtfZY" target="_blank">http://courteous.ly/4WtfZY</a></span></font><br>





</div></div>