[Scons-dev] tools and testing

Bill Deegan bill at baddogconsulting.com
Wed Apr 19 13:34:40 EDT 2017


Plenty of existing end to end tests function with mocked out external tools.
Any reason this can't be done for your pull request?

On Tue, Apr 18, 2017 at 10:18 PM, Russel Winder <russel at winder.org.uk>
wrote:

> On Tue, 2017-04-18 at 20:48 -0700, Bill Deegan wrote:
> > Would it be possible to mock the dub tool for a unit test?
> > (Or even for a E2E test?)
>
> I had sort of arrived at having to do that anyway to avoid the need for
> the dub program on the test server. I think we have to assume the Dub
> tool always does exactly what is says it does and so ignore it for all
> the tests. If I extract the subprocess call into a separate Python
> function, that enables mocking. For testing the basic stuff this should
> be OK. I have created a special case of the unit-threaded package
> because it needs a special builder for writing suite files. Most of
> that is already amenable to unit test, but not end-to-end unless dub is
> available.
>
> I will set about putting these tests in place, but given the SCons test
> infrastructure a full end-to-end system test may have to be left to
> what happens in the field.
>
> --
> Russel.
> ============================================================
> =================
> Dr Russel Winder      t: +44 20 7585 2200   voip:
> sip:russel.winder at ekiga.net
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> _______________________________________________
> 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/20170419/8be6eb44/attachment.html>


More information about the Scons-dev mailing list