summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDuncan McGreggor <duncan@ubuntu.com>2011-03-18 13:13:55 -0600
committerDuncan McGreggor <duncan@ubuntu.com>2011-03-18 13:13:55 -0600
commitc586d2534d29819c82a6f9802215598a5a968333 (patch)
treed89664cac47ec41e14c22ec471e13fd8f9555b02 /python
parent426c508adf4de1af9e5049e9e2da6a9a6bf6f4ee (diff)
Fixed type output for property method (should match C API).
Diffstat (limited to 'python')
-rw-r--r--python/evemu/device.py4
-rw-r--r--python/evemu/tests/test_device.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/python/evemu/device.py b/python/evemu/device.py
index 1c2aa47..7954fb6 100644
--- a/python/evemu/device.py
+++ b/python/evemu/device.py
@@ -208,9 +208,9 @@ class EvEmuDevice(base.EvEmuBase):
@property
def id_vendor(self):
- return hex(self._call(
+ return self._call(
self.get_lib().evemu_get_id_vendor,
- self.get_device_pointer()))
+ self.get_device_pointer())
@property
def id_product(self):
diff --git a/python/evemu/tests/test_device.py b/python/evemu/tests/test_device.py
index 0c430a0..89e6d99 100644
--- a/python/evemu/tests/test_device.py
+++ b/python/evemu/tests/test_device.py
@@ -95,7 +95,6 @@ class EvEmuDeviceTestCase(testcase.BaseTestCase):
self.create_testing_device()
(output_fd, filename) = tempfile.mkstemp()
self.device.write(filename)
- import pdb;pdb.set_trace()
os.close(output_fd)
data = open(filename).read()
self.assertEqual(data, "XX")
@@ -120,7 +119,7 @@ class EvEmuDevicePropertyTestCase(testcase.BaseTestCase):
def test_id_vendor(self):
self.create_testing_device()
- self.assertEqual(self.device.id_vendor, "0x1b96")
+ self.assertEqual(hex(self.device.id_vendor), "0x1b96")
def test_id_product(self):
self.create_testing_device()