Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove deprecated asynctest #226

Merged
merged 1 commit into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ coverage = "^7.0"
pytest = "^7.0"
pytest-httpbin = "^2.0.0"
pytest-randomly = "^3.5.0"
asynctest = "^0.13.0"
requests = "^2.26.0"
starlette = "^0.28.0"
httpx = "^0.24.0"
Expand Down
23 changes: 0 additions & 23 deletions tests/test_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,6 @@
from test_socket import assert_socket_blocked


@unix_sockets_only
def test_asynctest(testdir):
testdir.makepyfile(
"""
import socket
import asynctest


class AnExampleWithTestCaseAndCoroutines(asynctest.TestCase):
async def a_coroutine(self):
return "I worked"

async def test_that_a_coroutine_runs(self):
self.assertIn("worked", await self.a_coroutine())

async def test_inet_is_blocked(self):
socket.socket(socket.AF_INET, socket.SOCK_STREAM)
"""
)
result = testdir.runpytest("--disable-socket", "--allow-unix-socket")
result.assert_outcomes(passed=1, skipped=0, failed=1)


@unix_sockets_only
def test_starlette(testdir):
testdir.makepyfile(
Expand Down