def test_getitem_real(self, key, display): touchpad = Touchpad.find_first(display) touchpad_config = config.TouchpadConfiguration(touchpad) value = getattr(touchpad, key) if isinstance(value, float): value = round(value, 5) assert touchpad_config[key] == value
def pytest_funcarg__touchpad_config(request): touchpad = request.getfuncargvalue('touchpad') return config.TouchpadConfiguration(touchpad)
def test_init(self): cfg = config.TouchpadConfiguration(mock.sentinel.touchpad) assert cfg.touchpad is mock.sentinel.touchpad