Commit a1bc2a84 authored by Guido Gunther's avatar Guido Gunther
Browse files

pt/test_panel_brightness: Test max_brightness as well

This makes sure we don't regress on brightness conversion
parent 7491ed6a
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( 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