[Scons-dev] Python3 test CPPDEFINES/append
Gaurav Juvekar
gauravjuvekar at gmail.com
Fri Apr 7 00:51:06 EDT 2017
Hi,
I'm trying to make test/CPPDEFINES/append.py work with both py2 and py3. If I use a collections.OrderedDict subclass instead of a dict, then it is somehow preserved across environments. The attached minimal test case has the value generated in the Append() test preserved when AppendUnique() is called.
Does anyone have a idea why this is happening before I delve into the code?
--
Regards,
Gaurav Juvekar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minimal_append_example_SConstruct
Type: text/x-python
Size: 1224 bytes
Desc: not available
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170407/d2979327/attachment.py>
-------------- next part --------------
==== Testing CPPDEFINES, appending a string to a dict
orig = {'NAME2': 'VAL2', 'NAME3': None, 'NAME1': 'VAL1'}, append = FOO
Append:
result={'NAME2': 'VAL2', 'NAME3': None, 'NAME1': 'VAL1', 'FOO': None}
final=-DFOO -DNAME1=VAL1 -DNAME2=VAL2 -DNAME3
AppendUnique:
result=[('NAME2', 'VAL2'), ('NAME3',), ('NAME1', 'VAL1'), ('FOO',), 'FOO']
final=-DNAME2=VAL2 -DNAME3 -DNAME1=VAL1 -DFOO -DFOO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170407/d2979327/attachment.pgp>
More information about the Scons-dev
mailing list