From 12cf076118570eebbff08c6b3090e0d4798447a1 Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Wed, 3 Apr 2024 03:17:55 -0400 Subject: no venv --- .../site-packages/sniffio/_tests/__init__.py | 0 .../_tests/__pycache__/__init__.cpython-311.pyc | Bin 198 -> 0 bytes .../__pycache__/test_sniffio.cpython-311.pyc | Bin 5070 -> 0 bytes .../site-packages/sniffio/_tests/test_sniffio.py | 84 --------------------- 4 files changed, 84 deletions(-) delete mode 100644 venv/lib/python3.11/site-packages/sniffio/_tests/__init__.py delete mode 100644 venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/__init__.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/test_sniffio.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/sniffio/_tests/test_sniffio.py (limited to 'venv/lib/python3.11/site-packages/sniffio/_tests') diff --git a/venv/lib/python3.11/site-packages/sniffio/_tests/__init__.py b/venv/lib/python3.11/site-packages/sniffio/_tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 4a8da2e..0000000 Binary files a/venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/test_sniffio.cpython-311.pyc b/venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/test_sniffio.cpython-311.pyc deleted file mode 100644 index ea43664..0000000 Binary files a/venv/lib/python3.11/site-packages/sniffio/_tests/__pycache__/test_sniffio.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/sniffio/_tests/test_sniffio.py b/venv/lib/python3.11/site-packages/sniffio/_tests/test_sniffio.py deleted file mode 100644 index 02945a9..0000000 --- a/venv/lib/python3.11/site-packages/sniffio/_tests/test_sniffio.py +++ /dev/null @@ -1,84 +0,0 @@ -import os -import sys - -import pytest - -from .. import ( - current_async_library, AsyncLibraryNotFoundError, - current_async_library_cvar, thread_local -) - - -def test_basics_cvar(): - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - token = current_async_library_cvar.set("generic-lib") - try: - assert current_async_library() == "generic-lib" - finally: - current_async_library_cvar.reset(token) - - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - -def test_basics_tlocal(): - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - old_name, thread_local.name = thread_local.name, "generic-lib" - try: - assert current_async_library() == "generic-lib" - finally: - thread_local.name = old_name - - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - -def test_asyncio(): - import asyncio - - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - ran = [] - - async def this_is_asyncio(): - assert current_async_library() == "asyncio" - # Call it a second time to exercise the caching logic - assert current_async_library() == "asyncio" - ran.append(True) - - asyncio.run(this_is_asyncio()) - assert ran == [True] - - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - -@pytest.mark.skipif( - sys.version_info >= (3, 12), - reason= - "curio broken on 3.12 (https://github.com/python-trio/sniffio/pull/42)", -) -def test_curio(): - import curio - - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() - - ran = [] - - async def this_is_curio(): - assert current_async_library() == "curio" - # Call it a second time to exercise the caching logic - assert current_async_library() == "curio" - ran.append(True) - - curio.run(this_is_curio) - assert ran == [True] - - with pytest.raises(AsyncLibraryNotFoundError): - current_async_library() -- cgit v1.2.3