diff --git a/IPython/utils/tests/test_text.py b/IPython/utils/tests/test_text.py index ac09c2b..ce6e3d0 100644 --- a/IPython/utils/tests/test_text.py +++ b/IPython/utils/tests/test_text.py @@ -75,7 +75,6 @@ def eval_formatter_slicing_check(f): nt.assert_equals(s, ns['stuff'][::2]) nt.assert_raises(SyntaxError, f.format, "{n:x}", **ns) - def eval_formatter_no_slicing_check(f): ns = dict(n=12, pi=math.pi, stuff='hello there', os=os) @@ -83,6 +82,9 @@ def eval_formatter_no_slicing_check(f): s = f.format('{n:x} {pi**2:+f}', **ns) nt.assert_equals(s, "c +9.869604") + s = f.format('{stuff[slice(1,4)]}', **ns) + nt.assert_equals(s, 'ell') + nt.assert_raises(SyntaxError, f.format, "{a[:]}") def test_eval_formatter():