From f9cc27f51c8d4410315f904963e8428e6d3a1071 2011-03-28 20:40:29
From: Thomas Kluyver <takowl@gmail.com>
Date: 2011-03-28 20:40:29
Subject: [PATCH] Add %time within function to doctest.

---

diff --git a/IPython/core/tests/test_magic.py b/IPython/core/tests/test_magic.py
index 25ed013..9328c81 100644
--- a/IPython/core/tests/test_magic.py
+++ b/IPython/core/tests/test_magic.py
@@ -274,6 +274,14 @@ def doctest_time():
     In [10]: %time None
     CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
     Wall time: 0.00 s
+    
+    In [11]: def f(kmjy):
+       ....:    %time print 2*kmjy
+       
+    In [12]: f(3)
+    6
+    CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
+    Wall time: 0.00 s
     """