18 lines
466 B
Python
18 lines
466 B
Python
# -*- coding: utf-8 -*-
|
|
"""pytest 兼容入口:pytest 可直接收集 unittest 用例,
|
|
这里负责在会话级启动本地 mock MES 服务(与 runner.py 同一套)。"""
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
import pytest # noqa: E402
|
|
|
|
from mock.server import start_mock_server # noqa: E402
|
|
|
|
|
|
@pytest.fixture(scope='session', autouse=True)
|
|
def _mock_mes_server():
|
|
start_mock_server(port=8080)
|
|
yield
|