From c21a0bf53fb6d7e01e94bb361eb9d9969787a950 2014-12-15 18:28:51 From: Bussonnier Matthias <bussonniermatthias@gmail.com> Date: 2014-12-15 18:28:51 Subject: [PATCH] put test in content manager --- diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index 177ec72..2fc284e 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -136,13 +136,13 @@ def test_json(): nt.assert_equal(j._repr_json_(), d) with warnings.catch_warnings(record=True) as w: j = display.JSON(json.dumps(d)) - assert len(w) == 1 + nt.assert_equal(len(w), 1) nt.assert_equal(j._repr_json_(), d) j = display.JSON(lis) nt.assert_equal(j._repr_json_(), lis) with warnings.catch_warnings(record=True) as w: j = display.JSON(json.dumps(lis)) - assert len(w) == 1 + nt.assert_equal(len(w), 1) nt.assert_equal(j._repr_json_(), lis) - \ No newline at end of file +