From 22d7995d9b6c47407e0f130df8146debe03c6066 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 19 Jun 2013 21:07:41 -0400 Subject: [PATCH] Fix newline behavior when loading test files on Windows. --- tests/_test_tokenizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_test_tokenizer.py b/tests/_test_tokenizer.py index 382a9bf..c1d49cb 100644 --- a/tests/_test_tokenizer.py +++ b/tests/_test_tokenizer.py @@ -109,7 +109,7 @@ class TokenizerTestCase(object): def build(cls): """Load and install all tests from the 'tokenizer' directory.""" def load_file(filename): - with open(filename, "r") as fp: + with open(filename, "rU") as fp: text = fp.read() if not py3k: text = text.decode("utf8")