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