[Scons-dev] Unit testing with mock?

Paweł Tomulik ptomulik at meil.pw.edu.pl
Fri Oct 23 04:56:37 EDT 2015


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


More information about the Scons-dev mailing list