Skip to content

Commit

Permalink
Drop deprecated fixtures (#3932)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Jul 23, 2019
1 parent 030b11b commit ecc14fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
1 change: 1 addition & 0 deletions CHANGES/3932.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop deprecated ``unused_port``, ``test_server``, ``raw_test_server`` and ``test_client`` pytest fixtures.
28 changes: 0 additions & 28 deletions aiohttp/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,6 @@ def proactor_loop(): # type: ignore
yield _loop


@pytest.fixture
def unused_port(aiohttp_unused_port): # type: ignore # pragma: no cover
warnings.warn("Deprecated, use aiohttp_unused_port fixture instead",
DeprecationWarning)
return aiohttp_unused_port


@pytest.fixture
def aiohttp_unused_port(): # type: ignore
"""Return a port that is unused on the current host."""
Expand Down Expand Up @@ -266,13 +259,6 @@ async def finalize(): # type: ignore
loop.run_until_complete(finalize())


@pytest.fixture
def test_server(aiohttp_server): # type: ignore # pragma: no cover
warnings.warn("Deprecated, use aiohttp_server fixture instead",
DeprecationWarning)
return aiohttp_server


@pytest.fixture
def aiohttp_raw_server(loop): # type: ignore
"""Factory to create a RawTestServer instance, given a web handler.
Expand All @@ -296,13 +282,6 @@ async def finalize(): # type: ignore
loop.run_until_complete(finalize())


@pytest.fixture
def raw_test_server(aiohttp_raw_server): # type: ignore # pragma: no cover
warnings.warn("Deprecated, use aiohttp_raw_server fixture instead",
DeprecationWarning)
return aiohttp_raw_server


@pytest.fixture
def aiohttp_client(loop): # type: ignore
"""Factory to create a TestClient instance.
Expand Down Expand Up @@ -334,10 +313,3 @@ async def finalize(): # type: ignore
await clients.pop().close()

loop.run_until_complete(finalize())


@pytest.fixture
def test_client(aiohttp_client): # type: ignore # pragma: no cover
warnings.warn("Deprecated, use aiohttp_client fixture instead",
DeprecationWarning)
return aiohttp_client

0 comments on commit ecc14fd

Please sign in to comment.