diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index e06626c..249d2c6 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -611,7 +611,7 @@ python-profiler package from non-free.""") t_sys = t1[1] - t0[1] print "\nIPython CPU timings (estimated):" print "Total runs performed:", nruns - print " Times : %10.2f %10.2f" % ('Total', 'Per run') + print " Times : %10s %10s" % ('Total', 'Per run') print " User : %10.2f s, %10.2f s." % (t_usr, t_usr / nruns) print " System : %10.2f s, %10.2f s." % (t_sys, t_sys / nruns) twall1 = time.time() diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index d5edb86..50f6f23 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -248,3 +248,10 @@ tclass.py: deleting object: C-third na = os.path.join(mydir, 'nonascii.py') _ip.magic('run "%s"' % na) tt.assert_equals(_ip.user_ns['u'], u'Ўт№Ф') + + 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)