diff --git a/pytest.ini b/pytest.ini index 9504f45df..b754af883 100644 --- a/pytest.ini +++ b/pytest.ini @@ -15,6 +15,7 @@ markers = skip: Always skipped test. pyqt531_or_newer: Needs PyQt 5.3.1 or newer. xfail_norun: xfail the test with out running it + flaky: Tests which are flaky and should be rerun qt_log_level_fail = WARNING qt_log_ignore = ^SpellCheck: .* diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index a429784d0..78c2cffdb 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -760,6 +760,7 @@ class TestPyQIODevice: with pytest.raises(io.UnsupportedOperation): pyqiodev.seek(0, whence) + @pytest.mark.flaky(reruns=1) def test_qprocess(self, py_proc): """Test PyQIODevice with a QProcess which is non-sequential. diff --git a/tox.ini b/tox.ini index e1007fd29..18ca4c1ff 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,7 @@ deps = pytest-instafail==0.3.0 pytest-travis-fold==1.2.0 pytest-repeat==0.2 + pytest-rerunfailures==1.0.1 six==1.10.0 termcolor==1.1.0 vulture==0.8.1