[PATCH] run-tests: use json.dumps(separators=)
Martijn Pieters
mj at zopatista.com
Thu May 26 00:41:21 EDT 2016
On 25 May 2016 at 21:36, timeless <timeless at fmr.im> wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1464230144 0
> # Thu May 26 02:35:44 2016 +0000
> # Node ID b9b9babe6066a7682ae6ed7832aab713f30d38e0
> # Parent fd288d118074ea8d7b4ddec10da6e75a71ba3312
> # Available At https://bitbucket.org/timeless/mercurial-crew
> # hg pull https://bitbucket.org/timeless/mercurial-crew -r b9b9babe6066
> run-tests: use json.dumps(separators=)
>
> Followup to daff05dcd184 per Martijn Pieters
>
> diff -r fd288d118074 -r b9b9babe6066 tests/run-tests.py
> --- a/tests/run-tests.py Mon May 09 10:05:32 2016 +0200
> +++ b/tests/run-tests.py Thu May 26 02:35:44 2016 +0000
> @@ -1836,8 +1836,8 @@
> tres = {'result': res}
>
> outcome[tc.name] = tres
> - out = json.dumps(outcome, sort_keys=True, indent=4)
> - jsonout = '\n'.join([l.rstrip() for l in out.splitlines()])
> + jsonout = json.dumps(outcome, sort_keys=True, indent=4,
> + separators=(',', ': '))
> fp.writelines(("testreport =", jsonout))
>
> self._runner._checkhglib('Tested')
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Thanks for doing this! +1 from me.
--
Martijn Pieters
More information about the Mercurial-devel
mailing list