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.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to