Skip to content

Commit

Permalink
Change json indenting to make travis happy
Browse files Browse the repository at this point in the history
  • Loading branch information
abegong committed May 7, 2019
1 parent f4c3d20 commit 3d96db6
Showing 1 changed file with 2 additions and 75 deletions.
77 changes: 2 additions & 75 deletions tests/test_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,78 +185,5 @@ class TestContentBlockRenderers(unittest.TestCase):
}
},
)
print(json.dumps(result, indent=2))
assert json.dumps(result, indent=2) == """{
"content_block_type": "graph",
"content": [
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json",
"config": {
"view": {
"height": 300,
"width": 400
}
},
"datasets": {
"data-cfff8a6fe8134dace707fd67405d0857": [
{
"count": 45641,
"value": "Valid"
},
{
"count": 75,
"value": "Relict"
}
]
},
"height": 900,
"layer": [
{
"data": {
"name": "data-cfff8a6fe8134dace707fd67405d0857"
},
"encoding": {
"x": {
"field": "count",
"type": "quantitative"
},
"y": {
"field": "value",
"type": "ordinal"
}
},
"height": 80,
"mark": "bar",
"width": 240
},
{
"data": {
"name": "data-cfff8a6fe8134dace707fd67405d0857"
},
"encoding": {
"text": {
"field": "count",
"type": "quantitative"
},
"x": {
"field": "count",
"type": "quantitative"
},
"y": {
"field": "value",
"type": "ordinal"
}
},
"height": 80,
"mark": {
"align": "left",
"baseline": "middle",
"dx": 3,
"type": "text"
},
"width": 240
}
]
}
]
}"""
print(json.dumps(result))
assert json.dumps(result) == """{"content_block_type": "graph", "content": [{"$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json", "config": {"view": {"height": 300, "width": 400}}, "datasets": {"data-cfff8a6fe8134dace707fd67405d0857": [{"count": 45641, "value": "Valid"}, {"count": 75, "value": "Relict"}]}, "height": 900, "layer": [{"data": {"name": "data-cfff8a6fe8134dace707fd67405d0857"}, "encoding": {"x": {"field": "count", "type": "quantitative"}, "y": {"field": "value", "type": "ordinal"}}, "height": 80, "mark": "bar", "width": 240}, {"data": {"name": "data-cfff8a6fe8134dace707fd67405d0857"}, "encoding": {"text": {"field": "count", "type": "quantitative"}, "x": {"field": "count", "type": "quantitative"}, "y": {"field": "value", "type": "ordinal"}}, "height": 80, "mark": {"align": "left", "baseline": "middle", "dx": 3, "type": "text"}, "width": 240}]}]}"""

0 comments on commit 3d96db6

Please sign in to comment.