summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-05-05 20:36:17 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-05-05 20:36:27 +0200
commit413ce38abc7c04273fe8db735413f5cfab8b059e (patch)
tree9696274744fa3944cb286ec69f4cde1d017ad99a /tests
parent468d1f5dc150f194e521b01a85f48d0c762595f3 (diff)
downloadqutebrowser-413ce38abc7c04273fe8db735413f5cfab8b059e.tar.gz
qutebrowser-413ce38abc7c04273fe8db735413f5cfab8b059e.zip
tests: Fix test_check_coverage with Python 3.10
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/scripts/test_check_coverage.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/unit/scripts/test_check_coverage.py b/tests/unit/scripts/test_check_coverage.py
index d2a0b409f..efd35ce82 100644
--- a/tests/unit/scripts/test_check_coverage.py
+++ b/tests/unit/scripts/test_check_coverage.py
@@ -176,9 +176,6 @@ def test_untested_floats(covtest):
assert covtest.check() == [expected]
-@pytest.mark.skipif(
- sys.version_info[:4] == (3, 10, 0, 'alpha'),
- reason='Different results, see https://github.com/nedbat/coveragepy/issues/1106')
def test_untested_branches(covtest):
covtest.makefile("""
def func2(arg):
@@ -191,10 +188,11 @@ def test_untested_branches(covtest):
func2(True)
""")
covtest.run()
+ line_coverage = "83.33%" if sys.version_info[:2] >= (3, 10) else "100.00%"
expected = check_coverage.Message(
check_coverage.MsgType.insufficient_coverage,
'module.py',
- 'module.py has 100.00% line and 50.00% branch coverage!')
+ f'module.py has {line_coverage} line and 50.00% branch coverage!')
assert covtest.check() == [expected]