add ruff config

run files through formatter

add dosctrings to satisfy the linter
This commit is contained in:
2025-06-12 20:34:14 +01:00
parent fecd13d345
commit 582587bed5
21 changed files with 356 additions and 211 deletions

View File

@@ -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