From 50161f5ecb524712991d748ad7e444212f8fa796 2013-01-29 11:23:49 From: Robert Marchman Date: 2013-01-29 11:23:49 Subject: [PATCH] rlmv - Added test for issue #2784 The test checks for exceptions raised from bad string formatting when %run -t -N is called with N > 1. --- diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index a1cacc4..6087f54 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -330,3 +330,10 @@ tclass.py: deleting object: C-third # Check that __file__ was not leaked back into user_ns. nt.assert_equal(file1, file2) + + def test_run_formatting(self): + """ Test that %run -t -N does not raise a TypeError for N > 1.""" + src = "pass" + self.mktmp(src) + _ip.magic('run -t -N 1 %s' % self.fname) + _ip.magic('run -t -N 10 %s' % self.fname)