15 lines
423 B
Python
15 lines
423 B
Python
"""pytest 全局配置。"""
|
|
import pytest
|
|
|
|
|
|
def pytest_configure(config):
|
|
config.addinivalue_line("markers", "integration: 需要 MySQL/Redis 服务的集成测试")
|
|
config.addinivalue_line("markers", "e2e: 端到端测试")
|
|
|
|
|
|
@pytest.fixture
|
|
def fake_handler():
|
|
"""构造一个模拟 Tornado handler,供服务层单测使用。"""
|
|
from tests.fixtures.factories import FakeHandler
|
|
return FakeHandler
|