mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-12 17:10:57 +01:00
Six text-free styles (gradient, flow/Voronoi, habit heatmap, shutdown clock, Earth day/night, plasma) replace the white i3 root. A 15-minute systemd user timer picks a new random style per monitor every 3 hours, unlike its previous one and the other monitor's; live styles refresh in between. Also syncs i3/config with the live config and prunes the oldest evidence artifact for the 60-file cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWX51FMD58yKUC1eYWf
34 lines
915 B
Python
34 lines
915 B
Python
"""Tests for the ``python3 -m python_pkg.wallpaper_rotator`` entry point."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
import runpy
|
|
|
|
import pytest
|
|
|
|
from python_pkg.wallpaper_rotator import _tick
|
|
|
|
|
|
def _run_main(
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
caplog: pytest.LogCaptureFixture,
|
|
outcome: object,
|
|
) -> list[str]:
|
|
monkeypatch.setattr(_tick, "tick", lambda: outcome)
|
|
with caplog.at_level(logging.INFO):
|
|
runpy.run_module("python_pkg.wallpaper_rotator", run_name="__main__")
|
|
return caplog.messages
|
|
|
|
|
|
def test_main_reports_a_repaint(
|
|
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
|
) -> None:
|
|
assert "painted" in _run_main(monkeypatch, caplog, outcome=1)
|
|
|
|
|
|
def test_main_reports_an_unchanged_background(
|
|
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
|
|
) -> None:
|
|
assert "unchanged" in _run_main(monkeypatch, caplog, outcome=0)
|