Commit 84b6a7f3 authored by Guido Gunther's avatar Guido Gunther Committed by Angus Ainslie
Browse files

pt/test_panel_brightness: Test max_brightness as well

This makes sure we don't regress on brightness conversion
parent be32ccd2
import os
from . import boardtype
from . import sysfs
def test_panel_brightness():
"Check if panel brighness range"
path = "/sys/class/backlight/backlight-dsi"
upper = 228 if boardtype.is_librem5() else 100
mb_path = os.path.join(path, 'max_brightness')
sysfs.check_content_in_glob("{}\n".format(upper), mb_path)
f = open(os.path.join(path, 'brightness'))
assert int(f.read()) in range(0, upper + 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment