ipython/ipython — Issue #1148: A lot of testerrors
Author: jstenar
Created: 2011-12-13 18:21:10+00:00
State: open

I get 3 failures in IPython.testing, 16 errors and 10 failures in IPython.core on master 1184eb4, on windows python2.6.

All but one go away if I add the strict keyword argument to arg_split in _process_win32.py

diff --git a/IPython/utils/_process_win32.py b/IPython/utils/_process_win32.py
index 9de9edf..77a30a1 100644
--- a/IPython/utils/_process_win32.py
+++ b/IPython/utils/_process_win32.py
@@ -159,7 +159,7 @@ try:
LocalFree.res_type = HLOCAL
LocalFree.arg_types = [HLOCAL]

- def arg_split(commandline, posix=False):
+ def arg_split(commandline, posix=False, strict=False):
"""Split a command line's arguments in a shell-like manner.

This is a special version for windows that use a ctypes call to CommandLineToArgvW

After that only one error is remaining, and that one is included below. Is this related to arg_split differences on windows or is it present in Linux as well?

ERROR: test shlex issues with timeit (#1109)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\python26\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "c:\python\external\ipython\IPython\core\tests\test_magic.py", line 350, in test_timeit_shlex
_ip.magic('timeit -n1 "this is a bug".count(" ")')
File "c:\python\external\ipython\IPython\core\interactiveshell.py", line 1995, in magic
result = fn(magic_args)
File "c:\python\external\ipython\IPython\core\magic.py", line 1893, in magic_timeit
code = compile(src, "", "exec")
File "", line 6
this is a bug.count( )
^
SyntaxError: invalid syntax