Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix various tests on Windows #538

Merged
merged 1 commit into from Jun 26, 2011

Conversation

Projects
None yet
2 participants
Owner

minrk commented Jun 24, 2011

Windows had a variety of mostly path-related test failures remaining. With these changes, I have zero failures or errors when I run the test suite on my Windows 7 VM (64b Python 2.7.1).

Most of these were Windows-excluding assumptions in the tests themselves. The one change to the code itself is stripping quotation marks on Windows in magic_cd. os.chdir doesn't seem to like the quotes on Windows in some cases.

Absolute-path completions are now listed as a Known Failure on Windows. A local-path test that is a copy but wrapped in a cd so the prefix is './foo' instead of 'C:...\foo' shows that the completion does work for relative paths.

Owner

ellisonbg commented Jun 24, 2011

One issue we have to watch are UNC paths like \host\dir1\dir2. Did you spot anything that would cause a problem in this respect?

Owner

minrk commented Jun 24, 2011

I don't appear to have any problems working with UNC paths, the following work fine:

cd \\VBOXSVR\local
cd "\\VBOXSVR\local"
ls \\VBOXSVR\local
ls "\\VBOXSVR\local"

and relative-path completions also work from inside the shared location.

Note that after I cd into the share, any shell commands (e.g. %ls) will not work, because cmd doesn't support a UNC path as the working directory. This doesn't seem to have anything to do with IPython though - running subprocess.Popen('dir') from a UNC path in Python fails with the same error.

The main issue is that completions don't play nice with the backslash separator. This was a critical bug (#378) until I started testing, and realized that the same is true in 0.10, so it's not the regression I thought it was.

Owner

ellisonbg commented Jun 25, 2011

OK, thanks for the clarification. I realize that cmd does not support UNC paths and we can't get around that. But the main thing is that UNC paths can be used for things like the IPYTHONDIR. But this looks great and I am +1 on the merge.

fix various tests on Windows
Windows had a variety of mostly path-related test failures remaining.

Most of these were Windows-excluding assumptions in the tests themselves.  The one change to the code itself is stripping quotation marks on Windows in magic_cd.  os.chdir doesn't like the quotes on Windows.

absolute-path completions are now listed as a KnownFailure on Windows

@minrk minrk merged commit 5260180 into ipython:master Jun 26, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment