diff --git a/IPython/core/tests/print_argv.py b/IPython/core/tests/print_argv.py new file mode 100644 index 0000000..8d99000 --- /dev/null +++ b/IPython/core/tests/print_argv.py @@ -0,0 +1,2 @@ +import sys +print sys.argv[1:] diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index f4b4d9e..4445b9c 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -86,6 +86,28 @@ def doctest_run_builtins(): ....: """ + +def doctest_run_option_parser(): + r"""Test option parser in %run. + + In [1]: %run print_argv.py + [] + + In [2]: %run print_argv.py print*.py + ['print_argv.py'] + + In [3]: %run print_argv.py print\\*.py + ['print*.py'] + + In [4]: %run print_argv.py 'print*.py' + ['print_argv.py'] + + In [5]: %run -G print_argv.py print*.py + ['print*.py'] + + """ + + @py3compat.doctest_refactor_print def doctest_reset_del(): """Test that resetting doesn't cause errors in __del__ methods.