-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST, COMPAT: Make MMapWrapper tests Windows compatible #13732
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
TST, COMPAT: Make MMapWrapper tests Windows compatible #13732
Conversation
f.write(newline) # this "empty" line shouldn't raise | ||
f.write('2,two,II' + newline) | ||
|
||
f = open(path, 'r', newline=newline) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't u need to close this file (after using it)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that is true. Will fix.
264352d
to
5fe6b25
Compare
I think you can use |
Unfortunately, that seems to butcher what the end-of-line characters are: >>> f = open('test.txt', 'w+')
>>> f.write('a\r\n')
3
>>> f.write('a\r\n')
3
>>> f.write('a\r\n')
3
>>> f.close()
>>> f = open('test.txt', mode='U')
>>> f.readlines() # mmap will recognize the '\r\n' though
['a\n', 'a\n', 'a\n'] |
@jreback : Because this is a |
5fe6b25
to
dd1b60b
Compare
Current coverage is 84.56% (diff: 100%)@@ master #13732 diff @@
==========================================
Files 141 141
Lines 51196 51196
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 43296 43296
Misses 7900 7900
Partials 0 0
|
@jreback : I fixed the test, so Travis now passes. Ready to merge if there are no other concerns. |
lgtm (though @jorisvandenbossche if you'd test on windows to be sure) |
oddly though I cannot reproduce this anymore....... |
Sorry, I wasn't using my windows the last days |
Partially addresses #13721 by addressing the
MMapWrapper
test failure. The issue was we didn't have control over the newline character, so the test was re-written to give us that control.