Ejemplo n.º 1
0
def test_rating_japanese():
    assert parsers.rating('5つ星のうち 3.9') == 3.9
Ejemplo n.º 2
0
def test_rating_chinese():
    assert parsers.rating('平均 4.9 星') == 4.9
Ejemplo n.º 3
0
def test_rating_text_first():
    assert parsers.rating('Rated 4.82 out of 5 stars') == 4.82
Ejemplo n.º 4
0
def test_rating_with_comma_as_dec():
    assert parsers.rating('5,0 von 5 Sternen') == 5
Ejemplo n.º 5
0
def test_rating_5_out_of_5():
    assert parsers.rating('5.0 out of 5 stars') == 5
Ejemplo n.º 6
0
def test_rating_int_out_of():
    assert parsers.rating('3 out of 5 stars') == 3
Ejemplo n.º 7
0
def test_rating_float_out_of():
    assert parsers.rating('4.4 out of 5 stars') == 4.4
Ejemplo n.º 8
0
def test_rating_no_out_of():
    assert parsers.rating('An average of 4.1 star') == 4.1