def test_soundex(jf, s1, code): assert jf.soundex(s1) == code
def test_soundex_type(jf): assert jf.soundex(u'ABC') == 'A120' with pytest.raises(TypeError) as exc: jf.soundex(b'ABC') assert 'expected' in str(exc.value)
def test_soundex_type(jf): assert jf.soundex(u"ABC") == "A120" with pytest.raises(TypeError) as exc: jf.soundex(b"ABC") assert "expected" in str(exc.value)