Skip to content

Commit

Permalink
Merge branch 'backport/3.6/testing/pytest-xfail-strict' into 3.6
Browse files Browse the repository at this point in the history
This change makes pytest treat XPASS as failures.

This is per the best practices outlined by Paul Ganssle in his
lightning talk https://pganssle-talks.github.io/xfail-lightning
  • Loading branch information
webknjaz committed Mar 23, 2020
2 parents 0dbf937 + deba4b7 commit e9da15b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions pytest.ci.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ junit_suite_name = aiohttp_test_suite
norecursedirs = dist docs build .tox .eggs
minversion = 3.8.2
testpaths = tests/
xfail_strict = true
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ junit_suite_name = aiohttp_test_suite
norecursedirs = dist docs build .tox .eggs
minversion = 3.8.2
testpaths = tests/
xfail_strict = true
8 changes: 0 additions & 8 deletions tests/test_web_protocol.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Tests for aiohttp/server.py

import asyncio
import platform
import socket
from functools import partial
from unittest import mock
Expand All @@ -10,8 +9,6 @@

from aiohttp import helpers, http, streams, web

IS_MACOS = platform.system() == 'Darwin'


@pytest.fixture
def make_srv(loop, manager):
Expand Down Expand Up @@ -341,11 +338,6 @@ def close():
"Error handling request", exc_info=mock.ANY)


@pytest.mark.xfail(
IS_MACOS,
raises=TypeError,
reason='Intermittently fails on macOS',
)
async def test_handle_uncompleted_pipe(
make_srv, transport, request_handler, handle_with_error):
closed = False
Expand Down

0 comments on commit e9da15b

Please sign in to comment.