* Comment out pickle tests

This commit is contained in:
Matthew Honnibal 2016-01-25 15:51:13 +01:00
parent de94e6c525
commit eba03695ef

View File

@ -11,25 +11,23 @@ except NameError:
unicode = str unicode = str
# These cause the addition of temp files, that are then not deleted # These cause the addition of temp files, that are then not deleted
@pytest.mark.xfail #@pytest.mark.models
@pytest.mark.models #def test_pickle_english(EN):
def test_pickle_english(EN): # file_ = io.BytesIO()
file_ = io.BytesIO() # cloudpickle.dump(EN, file_)
cloudpickle.dump(EN, file_) #
# file_.seek(0)
file_.seek(0) #
# loaded = pickle.load(file_)
loaded = pickle.load(file_) # assert loaded is not None
assert loaded is not None #
#@pytest.mark.models
@pytest.mark.xfail #def test_cloudpickle_to_file(EN):
@pytest.mark.models # f = tempfile.NamedTemporaryFile(delete=False)
def test_cloudpickle_to_file(EN): # p = cloudpickle.CloudPickler(f)
f = tempfile.NamedTemporaryFile(delete=False) # p.dump(EN)
p = cloudpickle.CloudPickler(f) # f.close()
p.dump(EN) # loaded_en = cloudpickle.load(open(f.name, 'rb'))
f.close() # os.unlink(f.name)
loaded_en = cloudpickle.load(open(f.name, 'rb')) # doc = loaded_en(unicode('test parse'))
os.unlink(f.name) # assert len(doc) == 2
doc = loaded_en(unicode('test parse'))
assert len(doc) == 2