summaryrefslogtreecommitdiffstats
path: root/test/remote_test.py
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2019-03-01 08:55:49 +0100
committerOle Trøan <otroan@employees.org>2019-03-15 10:24:22 +0000
commite63325e3ca03c847963863446345e6c80a2c0cfd (patch)
treecae33764e6186727697e91862c32f2b08334866b /test/remote_test.py
parent4ba4edd15085ce31145ef5da6342e435c57c1150 (diff)
API: Cleanup APIs interface.api
Use of consistent API types for interface.api Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'test/remote_test.py')
-rw-r--r--test/remote_test.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/remote_test.py b/test/remote_test.py
index bc6d70764ec..f5b3c620cc4 100644
--- a/test/remote_test.py
+++ b/test/remote_test.py
@@ -3,14 +3,21 @@
import inspect
import os
import unittest
+from framework import VppTestCase
from multiprocessing import Process, Pipe
from pickle import dumps
-
import six
from six import moves
+import sys
+if sys.version_info <= (3, 4):
+ from aenum import IntEnum
+else:
+ from enum import IntEnum
-from framework import VppTestCase
-from enum import Enum
+if sys.version_info <= (3, 6):
+ from aenum import IntFlag
+else:
+ from enum import IntFlag
class SerializableClassCopy(object):
@@ -266,7 +273,7 @@ class RemoteClass(Process):
if type(obj) is tuple:
rv = tuple(rv)
return rv
- elif (isinstance(obj, Enum)):
+ elif (isinstance(obj, IntEnum) or isinstance(obj, IntFlag)):
return obj.value
else:
return self._make_obj_serializable(obj)