summaryrefslogtreecommitdiffstats
path: root/test/remote_test.py
diff options
context:
space:
mode:
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)