@pytest.mark.parametrize('y, expected', [(0, '[top]'), (100, '[bot]'), (75, '[75%]'), (25, '[25%]'), (5, '[ 5%]'), (None, '[???]')])
def test_percentage_text(percentage, y, expected):
 percentage.set_perc(x=None, y=y)
 assert (percentage.text() == expected)

@ pytest . mark . parametrize ( 'y, expected' , [ ( 0 , '[top]' ) , ( 100 , '[bot]' ) , ( 75 , '[75%]' ) , ( 25 , '[25%]' ) , ( 5 , '[ 5%]' ) , ( None , '[???]' ) ] ) def test_percentage_text ( percentage , y , expected ) : percentage . set_perc ( x = None , y = y ) assert ( percentage . text ( ) == expected )
test text displayed by the widget based on the y position of a page .