summaryrefslogtreecommitdiffstats
path: root/test/remote_test.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-25 12:47:04 -0800
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-25 12:47:04 -0800
commit00671cf9cfbcd9ed25d79712bf01d29cb8787bf2 (patch)
treed303607afac92b861515679af205725a31321cb1 /test/remote_test.py
parent61e63bf4e14eddebdd99814cf2633c2e638cd21c (diff)
VPP-1508 python3 tests: python3 repr.
Use six.reprlib. Uses repr for python 2 and reprlib for python 3. Change-Id: Ia343a492d533bd511ed57166381e10a37e452d36 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/remote_test.py')
-rw-r--r--test/remote_test.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/remote_test.py b/test/remote_test.py
index 16595002583..18db39ccb63 100644
--- a/test/remote_test.py
+++ b/test/remote_test.py
@@ -1,10 +1,13 @@
#!/usr/bin/env python
+import inspect
import os
import unittest
-import inspect
from multiprocessing import Process, Pipe
-from pickle import dumps, PicklingError
+from pickle import dumps
+
+import six
+
from framework import VppTestCase
@@ -99,7 +102,7 @@ class RemoteClass(Process):
self._pipe = Pipe() # pipe for input/output arguments
def __repr__(self):
- return repr(RemoteClassAttr(self, None))
+ return six.reprlib(RemoteClassAttr(self, None))
def __str__(self):
return str(RemoteClassAttr(self, None))
@@ -191,7 +194,7 @@ class RemoteClass(Process):
def _get_local_repr(self, path):
try:
obj = self._get_local_object(path)
- return repr(obj)
+ return six.reprlib(obj)
except AttributeError:
return None