##// END OF EJS Templates
Wrote test to ensure that number of nargs is calculated correctly.
Thomas Adriaan Hellinger -
Show More
@@ -47,4 +47,16 b' def test_alias_args_commented():'
47 with capture_output() as cap:
47 with capture_output() as cap:
48 _ip.run_cell('commetarg')
48 _ip.run_cell('commetarg')
49
49
50 nt.assert_equal(cap.stdout, 'this is %s a "commented out" arg') No newline at end of file
50 nt.assert_equal(cap.stdout, 'this is %s a "commented out" arg')
51
52 def test_alias_args_commented_nargs():
53 """Check that alias correctly counts args, excluding those commented out"""
54 am = _ip.alias_manager
55 alias_name = 'comargcount'
56 cmd = 'echo this is %%s a "commented out" arg and this is not %s'
57
58 am.define_alias(alias_name, cmd)
59 assert am.is_alias(alias_name)
60
61 thealias = am.get_alias(alias_name)
62 nt.assert_equal(thealias.nargs, 1) No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now