mirror of https://github.com/explosion/spaCy.git
Switch from python 3 only TemporaryDirectory to pytest's tmpdir
This commit is contained in:
parent
f32c6630cb
commit
38021fbb00
|
@ -1,15 +1,15 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
import json
|
||||
from tempfile import TemporaryDirectory, NamedTemporaryFile
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
from ...cli.train import train
|
||||
|
||||
|
||||
def test_cli_trained_model_can_be_saved():
|
||||
def test_cli_trained_model_can_be_saved(tmpdir):
|
||||
cmd = None
|
||||
lang = 'nl'
|
||||
with TemporaryDirectory() as output_dir:
|
||||
output_dir = str(tmpdir)
|
||||
train_file = NamedTemporaryFile('wb', dir=output_dir, delete=False)
|
||||
train_corpus = [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue