[PATCH evemu 10/16] python: drop evemu.const usages for device bits

Benjamin Tissoires benjamin.tissoires at gmail.com
Thu Aug 14 09:05:15 PDT 2014


On Wed, Aug 13, 2014 at 7:40 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> On Tue, Aug 12, 2014 at 01:48:27PM -0400, Benjamin Tissoires wrote:
>> On Mon, Aug 11, 2014 at 9:34 PM, Peter Hutterer
[snipped]
>> > diff --git a/python/evemu/tests/test_device.py b/python/evemu/tests/test_device.py
>> > index 3c16871..5ac00fd 100644
>> > --- a/python/evemu/tests/test_device.py
>> > +++ b/python/evemu/tests/test_device.py
>> > @@ -178,88 +178,58 @@ class DevicePropertiesTestCase(evemu.testing.testcase.BaseTestCase):
>> >          self.assertEqual(self._device.id_version, 272)
>> >
>> >      def test_get_abs_minimum(self):
>> > -        keys = evemu.const.absolute_axes.values()
>> > +        absmax = evemu.event_get_value("EV_ABS", "ABS_MAX")
>> > +        keys = range(0, absmax + 1)
>> >          results = dict((x, self._device.get_abs_minimum(x)) for x in keys)
>> >
>> >          self.assertEqual(results, self.get_expected_abs("min"))
>> >
>> > -        keys = evemu.const.absolute_axes.keys()
>> > -        results = dict((evemu.event_get_value("EV_ABS", x), self._device.get_abs_minimum(x)) for x in keys)
>> > -
>> > -        self.assertEqual(results, self.get_expected_abs("min"))
>> > -
>>
>> It took me a while to figure out why this has been removed and why
>> this was here in the first place.
>> Could you just amend the commit message saying that we do not need to
>> test both the event name and the event code because they are
>> guaranteed somewhere else?
>
> that's what paragraph 3 in the commit message was supposed to convey, but
> I'll reword it.
>

Oh, you are right (I should have paid more attention). Sorry for that.
Well, the new version is fine too, so I'll take the new.

Cheers,
Benjamin


More information about the Input-tools mailing list