feat: improve test configuration and fixtures
- Add cli to pytest.ini pythonpath for test discovery - Simplify tests/conftest.py to only mock aitbc_crypto when not importable - Add minimal aitbc_crypto.signing.ReceiptSigner mock for coordinator imports - Remove complex test fixtures and collection hooks - Update pytest.ini with comprehensive pythonpath entries - Add environment variables for tests - Add warning filters for common deprecations
This commit is contained in:
51
pytest.ini
51
pytest.ini
@@ -1,12 +1,47 @@
|
||||
[pytest]
|
||||
testpaths = tests apps/blockchain-node/tests apps/coordinator-api/tests apps/wallet/tests cli/tests
|
||||
python_files = test_*.py
|
||||
# pytest configuration for AITBC
|
||||
|
||||
# Test discovery
|
||||
python_files = test_*.py *_test.py
|
||||
python_classes = Test*
|
||||
python_functions = test_*
|
||||
addopts = -v --tb=short
|
||||
asyncio_mode = auto
|
||||
asyncio_default_fixture_loop_scope = function
|
||||
|
||||
# Custom markers
|
||||
markers =
|
||||
slow: marks tests as slow
|
||||
integration: marks tests as integration tests
|
||||
unit: marks tests as unit tests
|
||||
unit: Unit tests (fast, isolated)
|
||||
integration: Integration tests (may require external services)
|
||||
slow: Slow running tests
|
||||
|
||||
# Test paths to run
|
||||
testpaths = tests/cli apps/coordinator-api/tests/test_billing.py
|
||||
|
||||
# Additional options for local testing
|
||||
addopts =
|
||||
--verbose
|
||||
--tb=short
|
||||
|
||||
# Python path for imports (must match pyproject.toml)
|
||||
pythonpath =
|
||||
.
|
||||
cli
|
||||
packages/py/aitbc-core/src
|
||||
packages/py/aitbc-crypto/src
|
||||
packages/py/aitbc-p2p/src
|
||||
packages/py/aitbc-sdk/src
|
||||
apps/coordinator-api/src
|
||||
apps/wallet-daemon/src
|
||||
apps/blockchain-node/src
|
||||
|
||||
# Environment variables for tests
|
||||
env =
|
||||
AUDIT_LOG_DIR=/tmp/aitbc-audit
|
||||
DATABASE_URL=sqlite:///./test_coordinator.db
|
||||
|
||||
# Warnings
|
||||
filterwarnings =
|
||||
ignore::UserWarning
|
||||
ignore::DeprecationWarning
|
||||
ignore::PendingDeprecationWarning
|
||||
ignore::pytest.PytestUnknownMarkWarning
|
||||
ignore::pydantic.PydanticDeprecatedSince20
|
||||
ignore::sqlalchemy.exc.SADeprecationWarning
|
||||
|
||||
Reference in New Issue
Block a user