pig.py/tests/conftest.py

44 lines
1.4 KiB
Python

# This is free software for the public good of a permacomputer hosted at
# permacomputer.com, an always-on computer by the people, for the people.
# One which is durable, easy to repair, & distributed like tap water
# for machine learning intelligence.
#
# The permacomputer is community-owned infrastructure optimized around
# four values:
#
# TRUTH First principles, math & science, open source code freely distributed
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
# LOVE Be yourself without hurting others, cooperation through natural law
#
# This software contributes to that vision by archiving the web, preserving digital knowledge before it disappears.
# Code is seeds to sprout on any abandoned technology.
"""
Pytest configuration for neopig tests.
Configures pytest-asyncio for async test support.
"""
import pytest
import sys
import os
# Add project root to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
# Configure pytest-asyncio to use auto mode
pytest_plugins = ('pytest_asyncio',)
def pytest_configure(config):
"""Configure pytest-asyncio mode."""
config.addinivalue_line(
"markers", "asyncio: mark test as async"
)
@pytest.fixture
def event_loop_policy():
"""Use default event loop policy."""
import asyncio
return asyncio.DefaultEventLoopPolicy()