Mark some tests as integration and no coverage.

This commit is contained in:
Florian Bruhin 2015-08-11 19:36:27 +02:00
parent dc2b3ff433
commit 14545a3a22
5 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,7 @@ markers =
osx: Tests which only can run on OS X. osx: Tests which only can run on OS X.
not_frozen: Tests which can't be run if sys.frozen is True. 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. 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 = flakes-ignore =
UnusedImport UnusedImport
UnusedVariable UnusedVariable

View File

@ -234,6 +234,7 @@ class TestKeyConfigParser:
assert new == new_expected assert new == new_expected
@pytest.mark.integration
class TestDefaultConfig: class TestDefaultConfig:
"""Test validating of the default config.""" """Test validating of the default config."""
@ -255,6 +256,7 @@ class TestDefaultConfig:
runner.parse(cmd, aliases=False) runner.parse(cmd, aliases=False)
@pytest.mark.integration
class TestConfigInit: class TestConfigInit:
"""Test initializing of the config.""" """Test initializing of the config."""

View File

@ -67,12 +67,14 @@ def caret_tester(js_tester):
return CaretTester(js_tester) return CaretTester(js_tester)
@pytest.mark.integration
def test_simple(caret_tester): def test_simple(caret_tester):
"""Test with a simple (one-line) HTML text.""" """Test with a simple (one-line) HTML text."""
caret_tester.js.load('position_caret/simple.html') caret_tester.js.load('position_caret/simple.html')
caret_tester.check() caret_tester.check()
@pytest.mark.integration
def test_scrolled_down(caret_tester): def test_scrolled_down(caret_tester):
"""Test with multiple text blocks with the viewport scrolled down.""" """Test with multiple text blocks with the viewport scrolled down."""
caret_tester.js.load('position_caret/scrolled_down.html') caret_tester.js.load('position_caret/scrolled_down.html')
@ -81,6 +83,7 @@ def test_scrolled_down(caret_tester):
caret_tester.check() caret_tester.check()
@pytest.mark.integration
@pytest.mark.parametrize('style', ['visibility: hidden', 'display: none']) @pytest.mark.parametrize('style', ['visibility: hidden', 'display: none'])
def test_invisible(caret_tester, style): def test_invisible(caret_tester, style):
"""Test with hidden text elements.""" """Test with hidden text elements."""
@ -88,6 +91,7 @@ def test_invisible(caret_tester, style):
caret_tester.check() caret_tester.check()
@pytest.mark.integration
def test_scrolled_down_img(caret_tester): def test_scrolled_down_img(caret_tester):
"""Test with an image at the top with the viewport scrolled down.""" """Test with an image at the top with the viewport scrolled down."""
caret_tester.js.load('position_caret/scrolled_down_img.html') caret_tester.js.load('position_caret/scrolled_down_img.html')

View File

@ -204,6 +204,7 @@ class TestRAMHandler:
assert handler.dump_log() == "Two\nThree" assert handler.dump_log() == "Two\nThree"
@pytest.mark.integration
class TestInitLog: class TestInitLog:
"""Tests for init_log.""" """Tests for init_log."""

View File

@ -25,10 +25,12 @@ deps =
coverage==3.7.1 coverage==3.7.1
pytest-cov==2.0.0 pytest-cov==2.0.0
cov-core==1.15.0 cov-core==1.15.0
ignore_errors = True
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {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} 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" {envpython} -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit"
[testenv:mkvenv] [testenv:mkvenv]