瀏覽代碼

Fix newline behavior when loading test files on Windows.

tags/v0.2
Ben 11 年之前
父節點
當前提交
22d7995d9b
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      tests/_test_tokenizer.py

+ 1
- 1
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")


Loading…
取消
儲存