mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Merge remote-tracking branch 'refs/remotes/honnibal/master'
This commit is contained in:
		
						commit
						4dc09c374f
					
				| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
import pytest
 | 
			
		||||
 | 
			
		||||
import pickle
 | 
			
		||||
import StringIO
 | 
			
		||||
import io
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
from spacy.morphology import Morphology
 | 
			
		||||
| 
						 | 
				
			
			@ -12,6 +12,6 @@ from spacy.strings import StringStore
 | 
			
		|||
def test_pickle():
 | 
			
		||||
    morphology = Morphology(StringStore(), {}, Lemmatizer({}, {}, {})) 
 | 
			
		||||
 | 
			
		||||
    file_ = StringIO.StringIO()
 | 
			
		||||
    file_ = io.BytesIO()
 | 
			
		||||
    pickle.dump(morphology, file_)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,12 +2,13 @@ import pytest
 | 
			
		|||
 | 
			
		||||
import pickle
 | 
			
		||||
import cloudpickle
 | 
			
		||||
import StringIO
 | 
			
		||||
 | 
			
		||||
import io
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@pytest.mark.models
 | 
			
		||||
def test_pickle(EN):
 | 
			
		||||
    file_ = StringIO.StringIO()
 | 
			
		||||
    file_ = io.BytesIO()
 | 
			
		||||
    cloudpickle.dump(EN.parser, file_)
 | 
			
		||||
 | 
			
		||||
    file_.seek(0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,12 @@
 | 
			
		|||
import pytest
 | 
			
		||||
import StringIO
 | 
			
		||||
import io
 | 
			
		||||
import cloudpickle
 | 
			
		||||
import pickle
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@pytest.mark.models
 | 
			
		||||
def test_pickle_english(EN):
 | 
			
		||||
    file_ = StringIO.StringIO()
 | 
			
		||||
    file_ = io.BytesIO()
 | 
			
		||||
    cloudpickle.dump(EN, file_)
 | 
			
		||||
 | 
			
		||||
    file_.seek(0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
from __future__ import unicode_literals
 | 
			
		||||
import pytest
 | 
			
		||||
import StringIO
 | 
			
		||||
import io
 | 
			
		||||
import cloudpickle
 | 
			
		||||
import pickle
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -46,7 +46,7 @@ def test_symbols(en_vocab):
 | 
			
		|||
    
 | 
			
		||||
 | 
			
		||||
def test_pickle_vocab(en_vocab):
 | 
			
		||||
    file_ = StringIO.StringIO()
 | 
			
		||||
    file_ = io.BytesIO()
 | 
			
		||||
    cloudpickle.dump(en_vocab, file_)
 | 
			
		||||
 | 
			
		||||
    file_.seek(0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user