From c34c49c32c8d467be4561158f33f1d1d31065468 2012-06-07 19:19:50 From: Thomas Kluyver Date: 2012-06-07 19:19:50 Subject: [PATCH] Add failing test for issue gh-1878 --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index d978d5d..9c5fbfa 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -239,6 +239,14 @@ class InteractiveShellTestCase(unittest.TestCase): # This should not raise any exception: ip.var_expand(u'echo $f') + def test_var_expand_local(self): + ip.run_cell('def test():\n' + ' lvar = "ttt"\n' + ' ret = !echo {lvar}\n' + ' return ret[0]\n') + res = ip.user_ns['test']() + nt.assert_in('ttt', res) + def test_bad_var_expand(self): """var_expand on invalid formats shouldn't raise""" # SyntaxError