Show More
@@ -134,15 +134,20 def test_json(): | |||
|
134 | 134 | lis = [d] |
|
135 | 135 | j = display.JSON(d) |
|
136 | 136 | nt.assert_equal(j._repr_json_(), d) |
|
137 | ||
|
137 | 138 | with warnings.catch_warnings(record=True) as w: |
|
139 | warnings.simplefilter("always") | |
|
138 | 140 | j = display.JSON(json.dumps(d)) |
|
139 | 141 | nt.assert_equal(len(w), 1) |
|
140 | nt.assert_equal(j._repr_json_(), d) | |
|
142 | nt.assert_equal(j._repr_json_(), d) | |
|
143 | ||
|
141 | 144 | j = display.JSON(lis) |
|
142 | 145 | nt.assert_equal(j._repr_json_(), lis) |
|
146 | ||
|
143 | 147 | with warnings.catch_warnings(record=True) as w: |
|
148 | warnings.simplefilter("always") | |
|
144 | 149 | j = display.JSON(json.dumps(lis)) |
|
145 | 150 | nt.assert_equal(len(w), 1) |
|
146 | nt.assert_equal(j._repr_json_(), lis) | |
|
151 | nt.assert_equal(j._repr_json_(), lis) | |
|
147 | 152 | |
|
148 | 153 |
General Comments 0
You need to be logged in to leave comments.
Login now