aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_lisp.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-24 21:46:05 -0800
committerDamjan Marion <dmarion@me.com>2019-02-26 11:31:42 +0000
commit3bce8ebfdfaf2a4b576012beb3516d1f4030c20c (patch)
treead221819ad353c04e70a021978e50522a4b66998 /test/test_lisp.py
parentdd3737284d5021e2e3bd0413b61aab14797e365c (diff)
VPP-1508 Python3 abstract classes
Update the syntax to support abstract classes in python 2 and python 3. Depends on: new style classes -- https://gerrit.fd.io/r/16166 Change-Id: Iad2c1240149f38b3faca1b37ab95d3d210e1daee Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_lisp.py')
-rw-r--r--test/test_lisp.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_lisp.py b/test/test_lisp.py
index b6272dcb1bd..f66fcf79bc0 100644
--- a/test/test_lisp.py
+++ b/test/test_lisp.py
@@ -1,4 +1,7 @@
#!/usr/bin/env python
+
+import abc
+import six
import unittest
from scapy.fields import BitField, ByteField, FlagsField, IntField
@@ -28,6 +31,7 @@ bind_layers(LISP_GPE_Header, IPv6, next_proto=2)
bind_layers(LISP_GPE_Header, Ether, next_proto=3)
+@six.add_metaclass(abc.ABCMeta)
class Driver(object):
config_order = ['locator-sets',
@@ -61,7 +65,7 @@ class Driver(object):
Raw(payload))
return packet
- @abstractmethod
+ @abc.abstractmethod
def run(self):
""" testing procedure """
pass