函数作用域内的隔离引擎(固定种子、不启动线程)。
()
| 37 | |
| 38 | @pytest.fixture |
| 39 | def _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