使用固定种子、不启动后台线程的引擎(函数作用域,每次测试独立实例)。
()
| 37 | |
| 38 | @pytest.fixture |
| 39 | def test_engine(): |
| 40 | """使用固定种子、不启动后台线程的引擎(函数作用域,每次测试独立实例)。""" |
| 41 | eng = create_engine(seed=0, autostart=False) |
| 42 | yield eng |
| 43 | eng.running = False |
| 44 | |
| 45 | |
| 46 | @pytest.fixture |
nothing calls this directly
no test coverage detected