28 lines
642 B
Python
28 lines
642 B
Python
|
|
"""
|
||
|
|
Mumu模拟器测试
|
||
|
|
"""
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
|
||
|
|
|
||
|
|
def test_start_emulator_sequence(emulator):
|
||
|
|
"""测试模拟器启动和操作序列"""
|
||
|
|
assert not emulator.is_running(), "模拟器已启动"
|
||
|
|
emulator.start()
|
||
|
|
assert emulator.is_running(), "模拟器启动失败"
|
||
|
|
|
||
|
|
|
||
|
|
def test_run_sequence(emulator):
|
||
|
|
"""测试按顺序执行任务"""
|
||
|
|
if not emulator.is_running():
|
||
|
|
pytest.skip("模拟器未运行")
|
||
|
|
|
||
|
|
emulator.run_sequence()
|
||
|
|
|
||
|
|
|
||
|
|
def test_close_emulator(emulator):
|
||
|
|
"""测试关闭模拟器"""
|
||
|
|
if emulator.is_running():
|
||
|
|
emulator.close()
|
||
|
|
assert not emulator.is_running(), "模拟器关闭失败"
|