mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2025-05-20 16:10:26 +01:00
add output to scene switch command
add unit test patch bump
This commit is contained in:
parent
81762508a7
commit
1dd6992129
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
__version__ = "0.10.4"
|
||||
__version__ = "0.10.5"
|
||||
|
@ -65,5 +65,7 @@ def switch(
|
||||
|
||||
if preview:
|
||||
ctx.obj.set_current_preview_scene(scene_name)
|
||||
typer.echo(f'Switched to preview scene: {scene_name}')
|
||||
else:
|
||||
ctx.obj.set_current_program_scene(scene_name)
|
||||
typer.echo(f'Switched to program scene: {scene_name}')
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user