From 4bb5b89ee4bfbc75f070c7bd3a899a73a6fe3e87 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Fri, 13 Jan 2017 02:23:50 +0100 Subject: [PATCH] Add text_file_b fixture using BytesIO --- spacy/tests/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spacy/tests/conftest.py b/spacy/tests/conftest.py index d7eccb9fe..72e93cf59 100644 --- a/spacy/tests/conftest.py +++ b/spacy/tests/conftest.py @@ -16,7 +16,7 @@ from ..lemmatizer import Lemmatizer from ..attrs import ORTH, TAG, HEAD, DEP from ..util import match_best_version, get_data_path -from io import StringIO +from io import StringIO, BytesIO from pathlib import Path import os import pytest @@ -79,6 +79,10 @@ def lemmatizer(path): def text_file(): return StringIO() +@pytest.fixture +def text_file_b(): + return BytesIO() + @pytest.fixture def path():