mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Comment out pickle tests
This commit is contained in:
parent
de94e6c525
commit
eba03695ef
|
@ -11,25 +11,23 @@ except NameError:
|
|||
unicode = str
|
||||
|
||||
# These cause the addition of temp files, that are then not deleted
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.models
|
||||
def test_pickle_english(EN):
|
||||
file_ = io.BytesIO()
|
||||
cloudpickle.dump(EN, file_)
|
||||
|
||||
file_.seek(0)
|
||||
|
||||
loaded = pickle.load(file_)
|
||||
assert loaded is not None
|
||||
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.models
|
||||
def test_cloudpickle_to_file(EN):
|
||||
f = tempfile.NamedTemporaryFile(delete=False)
|
||||
p = cloudpickle.CloudPickler(f)
|
||||
p.dump(EN)
|
||||
f.close()
|
||||
loaded_en = cloudpickle.load(open(f.name, 'rb'))
|
||||
os.unlink(f.name)
|
||||
doc = loaded_en(unicode('test parse'))
|
||||
assert len(doc) == 2
|
||||
#@pytest.mark.models
|
||||
#def test_pickle_english(EN):
|
||||
# file_ = io.BytesIO()
|
||||
# cloudpickle.dump(EN, file_)
|
||||
#
|
||||
# file_.seek(0)
|
||||
#
|
||||
# loaded = pickle.load(file_)
|
||||
# assert loaded is not None
|
||||
#
|
||||
#@pytest.mark.models
|
||||
#def test_cloudpickle_to_file(EN):
|
||||
# f = tempfile.NamedTemporaryFile(delete=False)
|
||||
# p = cloudpickle.CloudPickler(f)
|
||||
# p.dump(EN)
|
||||
# f.close()
|
||||
# loaded_en = cloudpickle.load(open(f.name, 'rb'))
|
||||
# os.unlink(f.name)
|
||||
# doc = loaded_en(unicode('test parse'))
|
||||
# assert len(doc) == 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user