PKGBUILDs/community/python-autobahn/skip-test-missing-serializers.patch

35 lines
1.4 KiB
Diff
Raw Normal View History

2019-03-25 12:51:36 +00:00
diff --git a/autobahn/wamp/test/test_serializer.py b/autobahn/wamp/test/test_serializer.py
index 8e47805c..117df18d 100644
--- a/autobahn/wamp/test/test_serializer.py
+++ b/autobahn/wamp/test/test_serializer.py
@@ -129,11 +129,17 @@ def create_serializers():
_serializers.append(serializer.MsgPackSerializer())
_serializers.append(serializer.MsgPackSerializer(batched=True))
- _serializers.append(serializer.CBORSerializer())
- _serializers.append(serializer.CBORSerializer(batched=True))
+ try:
+ _serializers.append(serializer.CBORSerializer())
+ _serializers.append(serializer.CBORSerializer(batched=True))
+ except AttributeError:
+ pass
- _serializers.append(serializer.UBJSONSerializer())
- _serializers.append(serializer.UBJSONSerializer(batched=True))
+ try:
+ _serializers.append(serializer.UBJSONSerializer())
+ _serializers.append(serializer.UBJSONSerializer(batched=True))
+ except AttributeError:
+ pass
# FIXME: implement full FlatBuffers serializer for WAMP
if six.PY3:
@@ -146,6 +152,7 @@ def create_serializers():
@unittest.skipIf(not six.PY3, 'WAMP-FlatBuffers currently only supports Python 3')
+@unittest.skipIf(not hasattr(serializer, 'FlatBuffersSerializer'), 'FlatBuffers support missing')
class TestFlatBuffersSerializer(unittest.TestCase):
def test_basic(self):