Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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
Exemplo n.º 5
0
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)