[TIP] patch automatically functions in external library

Chris Jerdonek chris.jerdonek at gmail.com
Tue Aug 21 15:21:52 PDT 2012

On Mon, Aug 20, 2012 at 8:18 AM, andrea crotti
<andrea.crotti.0 at gmail.com> wrote:
> I have one "common" project that contains a lot of code which is useful
> from more different projects.
> All projects have (hopefully) unit tests, but what I'm worried about now
> is that changing a function signature in *common* might make break
> something somewhere else.

Maybe I'm not understanding the question, but wouldn't proper unit
testing of the "different" projects catch breaking changes in

If calls to the code in "common" are covered by your tests, then at
least some of those unit tests should fail if the common code changes
in an incompatible way.


> This is a common problem I guess, and I could use something like pylint
> maybe..
> But even better, if I'm able to
> - automatically mock every "common" import, using as a spec the real one
> - check that every function call has the right arguments
> it would be even better I think..
> Is that possible or is there another better way?
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list