mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2026-04-18 23:13:39 +00:00
add ruff config
run files through formatter add dosctrings to satisfy the linter
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
"""Test cases for scene commands in slobs_cli."""
|
||||
|
||||
import pytest
|
||||
from asyncclick.testing import CliRunner
|
||||
|
||||
@@ -6,20 +8,22 @@ from slobs_cli import cli
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_scene_list():
|
||||
"""Test the list scenes command."""
|
||||
runner = CliRunner()
|
||||
result = await runner.invoke(cli, ["scene", "list"])
|
||||
result = await runner.invoke(cli, ['scene', 'list'])
|
||||
assert result.exit_code == 0
|
||||
assert "slobs-test-scene-1" in result.output
|
||||
assert "slobs-test-scene-2" in result.output
|
||||
assert "slobs-test-scene-3" in result.output
|
||||
assert 'slobs-test-scene-1' in result.output
|
||||
assert 'slobs-test-scene-2' in result.output
|
||||
assert 'slobs-test-scene-3' in result.output
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_scene_current():
|
||||
"""Test the current scene command."""
|
||||
runner = CliRunner()
|
||||
result = await runner.invoke(cli, ["scene", "switch", "slobs-test-scene-2"])
|
||||
result = await runner.invoke(cli, ['scene', 'switch', 'slobs-test-scene-2'])
|
||||
assert result.exit_code == 0
|
||||
|
||||
result = await runner.invoke(cli, ["scene", "current"])
|
||||
result = await runner.invoke(cli, ['scene', 'current'])
|
||||
assert result.exit_code == 0
|
||||
assert "Current active scene: slobs-test-scene-2" in result.output
|
||||
assert 'Current active scene: slobs-test-scene-2' in result.output
|
||||
|
||||
Reference in New Issue
Block a user