From e3f97cf93844928ce9887b46eaa5e7fa7549e45d Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 13 Oct 2015 20:39:02 +1100 Subject: [PATCH] * Fix StringIO for Python3 in tests --- tests/tagger/test_lemmatizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tagger/test_lemmatizer.py b/tests/tagger/test_lemmatizer.py index 5dfdaabb1..91aa8ee65 100644 --- a/tests/tagger/test_lemmatizer.py +++ b/tests/tagger/test_lemmatizer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -import StringIO +import io import pickle from spacy.lemmatizer import Lemmatizer, read_index, read_exc @@ -46,7 +46,7 @@ def test_smart_quotes(lemmatizer): def test_pickle_lemmatizer(lemmatizer): - file_ = StringIO.StringIO() + file_ = io.BytesIO() pickle.dump(lemmatizer, file_) file_.seek(0)