def test_open_inmemory_invalid(): tagger = Tagger() with pytest.raises(ValueError): tagger.open_inmemory(b'') with pytest.raises(ValueError): tagger.open_inmemory(b'lCRFabc')