test: bootstrap backend pytest infrastructure with sanity tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[pytest]
|
||||
testpaths = tests
|
||||
asyncio_mode = auto
|
||||
pythonpath = .
|
||||
filterwarnings =
|
||||
ignore::DeprecationWarning:celery.*
|
||||
@@ -26,3 +26,4 @@ gallery-dl>=1.31.10
|
||||
# Testing
|
||||
pytest
|
||||
pytest-asyncio
|
||||
aioresponses
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"""Shared pytest fixtures for backend tests."""
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def anyio_backend():
|
||||
return "asyncio"
|
||||
@@ -0,0 +1,12 @@
|
||||
"""Sanity test to verify pytest infrastructure works."""
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
|
||||
def test_sync_sanity():
|
||||
assert 1 + 1 == 2
|
||||
|
||||
|
||||
async def test_async_sanity():
|
||||
await asyncio.sleep(0)
|
||||
assert True
|
||||
Reference in New Issue
Block a user