From 795ea6c7543bed401ab506ff4681bcde6ad83405 2013-12-03 20:14:18 From: Thomas Kluyver Date: 2013-12-03 20:14:18 Subject: [PATCH] Use argument lists for testing command help output. Avoids quoting and escaping issues if there is a space in sys.executable. Closes gh-4629 --- diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index b09da9b..1dacec4 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -425,7 +425,7 @@ def monkeypatch(obj, name, attr): def help_output_test(subcommand=''): """test that `ipython [subcommand] -h` works""" - cmd = ' '.join(get_ipython_cmd() + [subcommand, '-h']) + cmd = get_ipython_cmd() + [subcommand, '-h'] out, err, rc = get_output_error_code(cmd) nt.assert_equal(rc, 0, err) nt.assert_not_in("Traceback", err) @@ -436,7 +436,7 @@ def help_output_test(subcommand=''): def help_all_output_test(subcommand=''): """test that `ipython [subcommand] --help-all` works""" - cmd = ' '.join(get_ipython_cmd() + [subcommand, '--help-all']) + cmd = get_ipython_cmd() + [subcommand, '--help-all'] out, err, rc = get_output_error_code(cmd) nt.assert_equal(rc, 0, err) nt.assert_not_in("Traceback", err)