add output to scene switch command

add unit test

patch bump
This commit is contained in:
2025-05-19 01:45:31 +01:00
parent 81762508a7
commit 1dd6992129
3 changed files with 19 additions and 1 deletions

View File

@@ -20,3 +20,19 @@ def test_scene_current():
result = runner.invoke(app, ['scene', 'current'])
assert result.exit_code == 0
assert 'pytest' in result.stdout
def test_scene_switch():
"""Test the scene switch command."""
result = runner.invoke(app, ['studiomode', 'status'])
assert result.exit_code == 0
enabled = 'Studio mode is enabled.' in result.stdout
if enabled:
result = runner.invoke(app, ['scene', 'switch', 'pytest', '--preview'])
assert result.exit_code == 0
assert 'Switched to preview scene: pytest' in result.stdout
else:
result = runner.invoke(app, ['scene', 'switch', 'pytest'])
assert result.exit_code == 0
assert 'Switched to program scene: pytest' in result.stdout