diff --git a/pytest.ini b/pytest.ini index 7d374fb9a..c8a7c0aa2 100644 --- a/pytest.ini +++ b/pytest.ini @@ -8,6 +8,7 @@ markers = osx: Tests which only can run on OS X. not_frozen: Tests which can't be run if sys.frozen is True. frozen: Tests which can only be run if sys.frozen is True. + integration: Tests which test a bigger portion of code, run without coverage. flakes-ignore = UnusedImport UnusedVariable diff --git a/tests/config/test_config.py b/tests/config/test_config.py index 76ef7f7ff..94438df42 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -234,6 +234,7 @@ class TestKeyConfigParser: assert new == new_expected +@pytest.mark.integration class TestDefaultConfig: """Test validating of the default config.""" @@ -255,6 +256,7 @@ class TestDefaultConfig: runner.parse(cmd, aliases=False) +@pytest.mark.integration class TestConfigInit: """Test initializing of the config.""" diff --git a/tests/javascript/position_caret/test_position_caret.py b/tests/javascript/position_caret/test_position_caret.py index 11f67090f..024f15f08 100644 --- a/tests/javascript/position_caret/test_position_caret.py +++ b/tests/javascript/position_caret/test_position_caret.py @@ -67,12 +67,14 @@ def caret_tester(js_tester): return CaretTester(js_tester) +@pytest.mark.integration def test_simple(caret_tester): """Test with a simple (one-line) HTML text.""" caret_tester.js.load('position_caret/simple.html') caret_tester.check() +@pytest.mark.integration def test_scrolled_down(caret_tester): """Test with multiple text blocks with the viewport scrolled down.""" caret_tester.js.load('position_caret/scrolled_down.html') @@ -81,6 +83,7 @@ def test_scrolled_down(caret_tester): caret_tester.check() +@pytest.mark.integration @pytest.mark.parametrize('style', ['visibility: hidden', 'display: none']) def test_invisible(caret_tester, style): """Test with hidden text elements.""" @@ -88,6 +91,7 @@ def test_invisible(caret_tester, style): caret_tester.check() +@pytest.mark.integration def test_scrolled_down_img(caret_tester): """Test with an image at the top with the viewport scrolled down.""" caret_tester.js.load('position_caret/scrolled_down_img.html') diff --git a/tests/utils/test_log.py b/tests/utils/test_log.py index 790c20fe0..0adeb0ee1 100644 --- a/tests/utils/test_log.py +++ b/tests/utils/test_log.py @@ -204,6 +204,7 @@ class TestRAMHandler: assert handler.dump_log() == "Two\nThree" +@pytest.mark.integration class TestInitLog: """Tests for init_log.""" diff --git a/tox.ini b/tox.ini index 5d83e8a24..f282cc50c 100644 --- a/tox.ini +++ b/tox.ini @@ -25,10 +25,12 @@ deps = coverage==3.7.1 pytest-cov==2.0.0 cov-core==1.15.0 +ignore_errors = True commands = {envpython} scripts/link_pyqt.py --tox {envdir} - {envpython} -m py.test --strict -rfEsw --cov qutebrowser --cov-report xml --cov-report= {posargs:tests} + {envpython} -m py.test --strict -rfEsw --cov qutebrowser --cov-report xml --cov-report= {posargs:tests} -m 'not (integration or hypothesis)' {envpython} scripts/dev/check_coverage.py + {envpython} -m py.test --strict -rfEsw {posargs:tests} -m 'integration or hypothesis' {envpython} -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit" [testenv:mkvenv]