From ca280409e5a0f184c881638bc53df2a917642474 2015-03-26 14:25:05 From: Thomas Adriaan Hellinger Date: 2015-03-26 14:25:05 Subject: [PATCH] Added test code for 'commenting out' feature of alias magic --- diff --git a/IPython/core/tests/test_alias.py b/IPython/core/tests/test_alias.py index 8ae57f6..63479ae 100644 --- a/IPython/core/tests/test_alias.py +++ b/IPython/core/tests/test_alias.py @@ -38,4 +38,13 @@ def test_alias_args_error(): with capture_output() as cap: _ip.run_cell('parts 1') - nt.assert_equal(cap.stderr.split(':')[0], 'UsageError') \ No newline at end of file + nt.assert_equal(cap.stderr.split(':')[0], 'UsageError') + +def test_alias_args_commented(): + """Check that alias correctly ignores 'commented out' args""" + _ip.alias_manager.define_alias('commetarg', 'echo this is %%s a "commented out" arg') + + with capture_output as cap: + _ip.run_cell('commetarg') + + nt.assert_equal(cap.stdout, 'this is %s a "commented out" arg') \ No newline at end of file