[Scons-dev] Unit testing with mock?

William Blevins wblevins001 at gmail.com
Fri Oct 23 15:58:17 EDT 2015


Seems that the current design patterns in SCons test code to create a
fake.  It's slightly more work (and redundancy), but it will achieve what
you want without needing an extra dependency.

V/R,
William

On Thu, Oct 22, 2015 at 10:58 PM, Pawel Tomulik <ptomulik at meil.pw.edu.pl>
wrote:

> Hi,
>
> If I would like to contribute a module to scons, would it be acceptable
> to use mocks (https://pypi.python.org/pypi/mock) in unit tests? From
> what I see, none of the existsing unit tests in SCons use mocks, perhaps
> for a reason? Is it forbidden? Is there an alternative without using the
> module?
>
> The mock module is not included in the basic python distribution, it has
> to be installed, for example with pip (it's a backport of unittest.mock
> available in python >=3.3).
>
>
> Best regards!
>
> --
> Paweł Tomulik
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20151023/0ad273e8/attachment.html>


More information about the Scons-dev mailing list