def test_porter_type(jf): assert jf.porter_stem(u'abc') == 'abc' with pytest.raises(TypeError) as exc: jf.porter_stem(b'abc') assert 'expected' in str(exc.value)
def test_porter_stem(jf): with open('testdata/porter.csv', **open_kwargs) as f: reader = csv.reader(f) for (a, b) in reader: assert jf.porter_stem(a) == b
def test_porter_type(jf): assert jf.porter_stem(u"abc") == "abc" with pytest.raises(TypeError) as exc: jf.porter_stem(b"abc") assert "expected" in str(exc.value)