@pytest.mark.parametrize('qurl', [QUrl('http://abc123.com/this/awesome/url.html'), QUrl('https://supersecret.gov/nsa/files.txt'), None])
def test_set_url(url_widget, qurl):
 url_widget.set_url(qurl)
 if (qurl is not None):
  assert (url_widget.text() == qurl.toDisplayString())
 else:
  assert (url_widget.text() == '')

@ pytest . mark . parametrize ( 'qurl' , [ QUrl ( 'http://abc123.com/this/awesome/url.html' ) , QUrl ( 'https://supersecret.gov/nsa/files.txt' ) , None ] ) def test_set_url ( url_widget , qurl ) : url_widget . set_url ( qurl ) if ( qurl is not None ) : assert ( url_widget . text ( ) == qurl . toDisplayString ( ) ) else : assert ( url_widget . text ( ) == '' )
test text displayed by the widget .