Commit 04bac0da authored by Olivier R-D's avatar Olivier R-D

one more python2 hack, renenable event testing

parent 6d76e222
......@@ -137,9 +137,6 @@ def unpack_uatype_array(uatype, data):
result.append(unpack_uatype(uatype, data))
return result
def pack_string(string):
length = len(string)
if length == 0:
......@@ -158,7 +155,8 @@ def unpack_bytes(data):
def unpack_string(data):
b = unpack_bytes(data)
#return str(b, "utf-8")
if sys.version_info.major < 3:
return str(b)
return b.decode("utf-8")
def test_bit(data, offset):
......
......@@ -48,7 +48,7 @@ class MySubHandler():
self.future.set_result((handle, node, val, attr))
def event(self, handle, event):
self.future.set_result((handle, node, val, attr))
self.future.set_result((handle, event))
class Unit(unittest.TestCase):
......@@ -273,7 +273,7 @@ class CommonTests(object):
sub.unsubscribe(handle)
sub.delete()
def _test_events(self):
def test_events(self):
msclt = MySubHandler()
#cond = msclt.setup()
sub = self.opc.create_subscription(100, msclt)
......
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