From ad81bcf4a248939eebf545ea46ed834944c055e4 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Sun, 18 Jun 2023 13:10:37 -0400 Subject: [PATCH] test: remove deprecated asynctest The author has mentioned that they no longer work on the library. https://github.com/Martiusweb/asynctest/issues/158#issuecomment-785872568 Since we have other tests in place now that exercise asyncio-style tests, we can remove this test and dependency. Resolves #161 Signed-off-by: Mike Fiedler --- pyproject.toml | 1 - tests/test_async.py | 23 ----------------------- 2 files changed, 24 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 42afe98..69517c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/tests/test_async.py b/tests/test_async.py index 6f63634..e272994 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -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(