[PATCH 01/20] test: new test framework to compare json parts
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Jun 6 07:49:19 PDT 2018
On Tue 2018-06-05 22:06:07 -0300, David Bremner wrote:
> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>> +
>> +if len(sys.argv) < 2:
>> + sys.exit("""usage: {} EXPR [EXPR]
>> +
>
> the useage message doesn't seem to work? I get
>
> ââ zancas:software/upstream/notmuch/test
> â°â (git)-[master]-% python3 json_check_nodes.py
> Traceback (most recent call last):
> File "json_check_nodes.py", line 42, in <module>
> """.format(sys.argv[0]))
> KeyError: '"c"'
>
> I guess this is not tested with python2?
>
> ââ zancas:software/upstream/notmuch/test
> â°â (git)-[master]-% echo '["a", "b", {"c": 1}]' | python2 json_check_nodes.py 'second_d:[1]="d"' 'no_c:[2]!"c"'
> Traceback (most recent call last):
> File "json_check_nodes.py", line 60, in <module>
> e = 'data{}'.format(expr['address'])
> TypeError: '_sre.SRE_Match' object has no attribute '__getitem__'
>
> The test suite currently supports python2 and python3 (or at least it's
> supposed to).
thanks for noticing these incompatibilities with python2. i've
corrected them in my working tree, and will include the fixes in the
next revision of this series.
--dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20180606/6bb36304/attachment.sig>
More information about the notmuch
mailing list