[Scons-dev] Unit testing with mock?

Bill Deegan bill at baddogconsulting.com
Fri Oct 23 10:19:04 EDT 2015


Pawel,

If the plan was to migrate SCons to 3.x and drop support for 2.7, then
maybe using mocks would be ok now.
But the plan is to support both for some time once we get SCons working
with 3.x.

What are you using mocks for now? Can you point to a repo?
Note that thus far, the mocks module has not been used, so chances are it
can be done without additional modules (though perhaps with more code).

-Bill

On Fri, Oct 23, 2015 at 1:56 AM, Paweł Tomulik <ptomulik at meil.pw.edu.pl>
wrote:

> So, what should I replace my existing mocks with? Do you know any
> technique?
>
> These mocks would only be required for unit-testing scons package, so
> this doesn't affect plain users (only developers and scons package
> maintainers would be affected). And starting from 3.3, the mock module
> is part of python standard.
>
>
>
> W dniu 23.10.2015 o 09:21, Alexandre Feblot pisze:
> > Hi,
> > Please, please, please,
> > Don't!
> > Don't force people to install additional modules.
> > One of Python benefits is how rich its standard distribution is,
> compared to perl for example, allowing to distribute code that you know
> will work everywhere without additional requirement.
> > Please don't break that.
> >
> > Alexandre
> >
> >> Le 22 oct. 2015 à 23:58, Pawel Tomulik <ptomulik at meil.pw.edu.pl> a
> écrit :
> >>
> >> 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
> > _______________________________________________
> > Scons-dev mailing list
> > Scons-dev at scons.org
> > https://pairlist2.pair.net/mailman/listinfo/scons-dev
> >
>
>
> --
> Paweł Tomulik, tel. (22) 234 7925
> Instytut Techniki Lotniczej i Mechaniki Stosowanej
> Politechnika Warszawska
> _______________________________________________
> 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/6e116357/attachment-0001.html>


More information about the Scons-dev mailing list