mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-08 12:18:06 +00:00
test(vegas): cover the width cap still working when asked for
Defaulting the cap off must not quietly remove it. Asserts that an explicit ratio is honoured and validates, alongside the existing check that omitting it means uncapped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Udr6MfaFLUPhX5Fgo67Jf5
This commit is contained in:
co-authored by
Claude Opus 5
parent
e0d62a9e54
commit
f8d700e5d9
@@ -787,6 +787,14 @@ class TestNewConfigKeys:
|
|||||||
assert VegasModeConfig().max_plugin_width_ratio == 0.0
|
assert VegasModeConfig().max_plugin_width_ratio == 0.0
|
||||||
assert VegasModeConfig.from_config({}).max_plugin_width_ratio == 0.0
|
assert VegasModeConfig.from_config({}).max_plugin_width_ratio == 0.0
|
||||||
|
|
||||||
|
def test_width_cap_is_still_available_when_asked_for(self):
|
||||||
|
# Defaulting the cap off must not remove it: a user who sets a ratio
|
||||||
|
# still gets one, and 0 still means uncapped.
|
||||||
|
cfg = VegasModeConfig.from_config(
|
||||||
|
{'display': {'vegas_scroll': {'max_plugin_width_ratio': 3.0}}})
|
||||||
|
assert cfg.max_plugin_width_ratio == 3.0
|
||||||
|
assert cfg.validate() == []
|
||||||
|
|
||||||
@pytest.mark.parametrize('overrides,bad_key', [
|
@pytest.mark.parametrize('overrides,bad_key', [
|
||||||
({'render_width_pct': 5}, 'render_width_pct'),
|
({'render_width_pct': 5}, 'render_width_pct'),
|
||||||
({'render_width_pct': 101}, 'render_width_pct'),
|
({'render_width_pct': 101}, 'render_width_pct'),
|
||||||
|
|||||||
Reference in New Issue
Block a user