Check that alias correctly ignores 'commented out' args
()
| 41 | nt.assert_equal(cap.stderr.split(':')[0], 'UsageError') |
| 42 | |
| 43 | def test_alias_args_commented(): |
| 44 | """Check that alias correctly ignores 'commented out' args""" |
| 45 | _ip.magic('alias commetarg echo this is %%s a commented out arg') |
| 46 | |
| 47 | with capture_output() as cap: |
| 48 | _ip.run_cell('commetarg') |
| 49 | |
| 50 | # strip() is for pytest compat; testing via iptest patch IPython shell |
| 51 | # in testin.globalipapp and replace the system call which messed up the |
| 52 | # \r\n |
| 53 | assert cap.stdout.strip() == 'this is %s a commented out arg' |
| 54 | |
| 55 | def test_alias_args_commented_nargs(): |
| 56 | """Check that alias correctly counts args, excluding those commented out""" |
nothing calls this directly
no test coverage detected