@pytest.mark.parametrize('os_name, qversion, expected', [('linux', '5.2.1', True), ('linux', '5.4.1', True), ('nt', '5.2.1', False), ('nt', '5.3.0', True), ('nt', '5.4.1', True)])
def test_check_print_compat(os_name, qversion, expected, monkeypatch):
 monkeypatch.setattr('qutebrowser.utils.qtutils.os.name', os_name)
 monkeypatch.setattr('qutebrowser.utils.qtutils.qVersion', (lambda : qversion))
 assert (qtutils.check_print_compat() == expected)

@ pytest . mark . parametrize ( 'os_name, qversion, expected' , [ ( 'linux' , '5.2.1' , True ) , ( 'linux' , '5.4.1' , True ) , ( 'nt' , '5.2.1' , False ) , ( 'nt' , '5.3.0' , True ) , ( 'nt' , '5.4.1' , True ) ] ) def test_check_print_compat ( os_name , qversion , expected , monkeypatch ) : monkeypatch . setattr ( 'qutebrowser.utils.qtutils.os.name' , os_name ) monkeypatch . setattr ( 'qutebrowser.utils.qtutils.qVersion' , ( lambda : qversion ) ) assert ( qtutils . check_print_compat ( ) == expected )
test check_print_compat .