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