v0.90.1: the visualizer's sync delay is a box with 1 ms arrows instead of a slider
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Round 125: the visualizer's sync delay is a box with 1 ms arrows, not a
|
||||
slider (too fidgety to set to the millisecond)."""
|
||||
from PyQt6.QtWidgets import QSpinBox
|
||||
|
||||
from lintunes.gui import visualizer_styles as vs
|
||||
from lintunes.preferences import Preferences
|
||||
from test_round108 import _dialog
|
||||
|
||||
|
||||
def test_every_styles_sync_delay_is_a_1_ms_spin_box(qapp, tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path / "cfg"))
|
||||
dialog = _dialog(Preferences(tmp_path))
|
||||
assert set(dialog._sync_sliders) == set(vs.STYLES)
|
||||
for box in dialog._sync_sliders.values():
|
||||
assert isinstance(box, QSpinBox)
|
||||
assert box.singleStep() == 1
|
||||
assert (box.minimum(), box.maximum()) == vs.SYNC_DELAY_LIMITS
|
||||
before = box.value()
|
||||
box.stepBy(1)
|
||||
assert box.value() == before + 1
|
||||
Reference in New Issue
Block a user