diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index b2ab99952..a6d9eada2 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -31,7 +31,7 @@ pytest-cov==2.6.0 pytest-faulthandler==1.5.0 pytest-instafail==0.4.0 pytest-mock==1.10.0 -pytest-qt==3.1.0 +pytest-qt==3.2.0 pytest-repeat==0.7.0 pytest-rerunfailures==4.1 pytest-travis-fold==1.3.0 diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py index da73ca162..da923a448 100644 --- a/tests/unit/browser/test_caret.py +++ b/tests/unit/browser/test_caret.py @@ -298,7 +298,7 @@ class TestSearch: with qtbot.wait_callback() as callback: web_tab.search.search('fiv', result_cb=callback) - assert callback.args == [True] + callback.assert_called_with(True) mode_manager.enter(usertypes.KeyMode.caret) caret.move_to_end_of_line() @@ -312,11 +312,11 @@ class TestSearch: with qtbot.wait_callback() as callback: web_tab.search.search('w', result_cb=callback) - assert callback.args == [True] + callback.assert_called_with(True) with qtbot.wait_callback() as callback: web_tab.search.next_result(result_cb=callback) - assert callback.args == [True] + callback.assert_called_with(True) mode_manager.enter(usertypes.KeyMode.caret) diff --git a/tests/unit/javascript/conftest.py b/tests/unit/javascript/conftest.py index b2a5924da..667e289e2 100644 --- a/tests/unit/javascript/conftest.py +++ b/tests/unit/javascript/conftest.py @@ -112,7 +112,7 @@ class JSTester: """ with self.qtbot.wait_callback() as callback: self.tab.run_js_async(source, callback, world=world) - assert callback.args == [expected] + callback.assert_called_with(expected) @pytest.fixture diff --git a/tests/unit/javascript/position_caret/test_position_caret.py b/tests/unit/javascript/position_caret/test_position_caret.py index eb5a05ad4..91c9dd91b 100644 --- a/tests/unit/javascript/position_caret/test_position_caret.py +++ b/tests/unit/javascript/position_caret/test_position_caret.py @@ -58,7 +58,7 @@ class CaretTester: with self._qtbot.wait_callback() as callback: self.js.tab.caret.selection(lambda text: callback(text.rstrip())) - assert callback.args == ['MARKER'] + callback.assert_called_with('MARKER') def check_scrolled(self): """Check if the page is scrolled down.""" diff --git a/tests/unit/javascript/test_greasemonkey.py b/tests/unit/javascript/test_greasemonkey.py index 9870352d4..03a914878 100644 --- a/tests/unit/javascript/test_greasemonkey.py +++ b/tests/unit/javascript/test_greasemonkey.py @@ -240,7 +240,7 @@ class TestWindowIsolation: with qtbot.wait_callback() as callback: page.runJavaScript(setup.test_script, callback) - assert callback.args == [setup.expected] + callback.assert_called_with(setup.expected) # The JSCore in 602.1 doesn't fully support Proxy. @pytest.mark.qtwebkit6021_skip diff --git a/tests/unit/javascript/test_js_execution.py b/tests/unit/javascript/test_js_execution.py index 4d47e62c5..1a0ac8dc5 100644 --- a/tests/unit/javascript/test_js_execution.py +++ b/tests/unit/javascript/test_js_execution.py @@ -78,4 +78,4 @@ def test_simple_js_webengine(qtbot, webengineview, qapp, with qtbot.wait_callback() as callback: page.runJavaScript('1 + 1', world, callback) - assert callback.args == [expected] + callback.assert_called_with(expected)