[Scons-dev] Reusing test scripts
Bill Deegan
bill at baddogconsulting.com
Fri Sep 30 18:43:45 EDT 2016
You're thinking about putting all these in the test/fixture/ directory
right?
-Bill
On Fri, Sep 30, 2016 at 5:54 PM, William Blevins <wblevins001 at gmail.com>
wrote:
> Team,
>
> Many of the integration tests have scripts named something like
> "my<xxx>.py" which are identical except for a custom hard-coded string. I
> would like to make these scripts common and shared (when possible); this
> should not invalidate or weaken any tests. They all run in different
> directories. For example, in the snippet below of "mycc.py", the "/*cc*/"
> would become something generic so that all the tests could use the same
> script. This would reduce a lot of redundancy and reduce the amount of work
> of future test maintenance plus porting to Python 2/3 support.
>
>> import sys
>> outfile = open(sys.argv[1], 'wb')
>> infile = open(sys.argv[2], 'rb')
>> for l in [l for l in infile.readlines() if l[:6] != b'/*cc*/']:
>> outfile.write(l)
>> sys.exit(0)
>>
>> Is this acceptable?
>
> V/R,
> William
>
> _______________________________________________
> 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/20160930/4b52a79c/attachment.html>
More information about the Scons-dev
mailing list