-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix windows unit tests #3294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix windows unit tests #3294
Conversation
xavfernandez
commented
Dec 5, 2015
- All unit tests seem to pass on windows 2.7
- A peculiar error seems to happen on 3.3/3.4: https://ci.appveyor.com/project/xavfernandez/pip/build/1.0.44/job/jpdg33yn3hccuaxe it's unclear why it only happens on windows, cc @pfmoore
- Something seems off with py35 :-/
Well, the error is with _secure_open_write(lock.path, self.filemode) as fh:
fh.write(value)
TypeError: 'str' does not support the buffer interface and cache = SafeFileCache(cache_dir)
cache.set("foo", "bar") But see https://github.com/pypa/pip/blob/develop/pip/_vendor/cachecontrol/caches/file_cache.py#L44 - This seems like it's a simple bug, nothing to do with Windows (although maybe there's some oddity in Unix that means the error isn't getting picked up there?) |
Yes it seems simple but there should be no difference for unix/windows :'( |
Agreed. But I'd focus on working out why the test doesn't fail on Unix first, as I think it should. Even if you confirm that the Unix behaviour is correct, then knowing why should help work out what's wrong on Windows. |
6367bad
to
0771a19
Compare
b738f79
to
3242170
Compare
Ah, I see. Yes, chmod doesn't do that on Windows (indeed, chmod is largely meaningless on Windows, the Windows permission model is very different from the Unix one). Nice catch. |
Also caught an issue with But for the failing tests with python3.5 it looks more like a pytest issue: https://ci.appveyor.com/project/xavfernandez/pip/build/job/vb2mx08p8rkjo056 So I think I'll merge it as is. Maybe we could add a hook on |
It looks like it was fixed in pytest-dev/pytest@b18e643 so pytest-2.7.3 . And of course we are pinned to 2.7.2 due to pytest-dev/pytest#1083 😐 |
a063654
to
dda0379
Compare
dc1d896
to
f159871
Compare
For windows under python2
Since Windows is lacking geteuid, it is useless.
f159871
to
b998ab6
Compare
Merged this as is, to have xavfernandez@b47c144 in pip 8.0. |