[Buildbot-commits] [buildbot/buildbot] d8ecc2: Handle both json and simplejson in unit tests
GitHub
noreply at github.com
Sat Apr 20 11:51:51 UTC 2013
Branch: refs/heads/nine
Home: https://github.com/buildbot/buildbot
Commit: d8ecc28a191f2e836c8a878d6dd45d1b04a8bf47
https://github.com/buildbot/buildbot/commit/d8ecc28a191f2e836c8a878d6dd45d1b04a8bf47
Author: Olof Johansson <olofjn at axis.com>
Date: 2013-04-20 (Sat, 20 Apr 2013)
Changed paths:
M master/buildbot/test/unit/test_www_rest.py
Log Message:
-----------
Handle both json and simplejson in unit tests
The simplejson and the json modules differ in the way they handle
trailing whitespace when indent is set.
>>> json.dumps({"foo":[1,2]}, indent=2)
'{\n "foo": [\n 1, \n 2\n ]\n}'
>>> simplejson.dumps({"foo":[1,2]}, indent=2)
'{\n "foo": [\n 1,\n 2\n ]\n}'
With this change, the unit tests use the same json implementation as the
tested code instead of hardcoding the expected json string in this
situation.
Commit: 5b86ae071331944ef9969dda8c7d8681397b849f
https://github.com/buildbot/buildbot/commit/5b86ae071331944ef9969dda8c7d8681397b849f
Author: Dustin J. Mitchell <dustin at mozilla.com>
Date: 2013-04-20 (Sat, 20 Apr 2013)
Changed paths:
M master/buildbot/test/unit/test_www_rest.py
Log Message:
-----------
Merge branch 'topic/unit-simplejson_vs_json' of git://github.com/olof/buildbot into nine
Compare: https://github.com/buildbot/buildbot/compare/e145f0290e52...5b86ae071331
More information about the Commits
mailing list