diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-03-10 07:32:59 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-03-11 01:14:53 +0000 |
commit | f70cead5eb928954908de48300cc7a9c88430c0f (patch) | |
tree | fca67967fcc2c71be882bfaad624affaebddbaab /test/remote_test.py | |
parent | a1bfb3a4d2eeb79311e2eea2c84779c798e275cd (diff) |
Tests: 'Fix' __del__ in test/remote_test.py.
This is not a fix as much as supressing a warning.
__del__ is not a destructor.
test/remote_test.py:385:13: F821 undefined name 'cls'
cls.vpp.poll()
^
test/remote_test.py:386:16: F821 undefined name 'cls'
if cls.vpp.returncode is None:
^
test/remote_test.py:387:17: F821 undefined name 'cls'
cls.vpp.terminate()
^
test/remote_test.py:388:17: F821 undefined name 'cls'
cls.vpp.communicate()
Change-Id: I6f0ecf3ae5dee7f279a4e25994cc1c49470bca26
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/remote_test.py')
-rw-r--r-- | test/remote_test.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/remote_test.py b/test/remote_test.py index 43cb9b93080..e90ccb24f83 100644 --- a/test/remote_test.py +++ b/test/remote_test.py @@ -375,12 +375,14 @@ class RemoteVppTestCase(VppTestCase): def __init__(self): super(RemoteVppTestCase, self).__init__("emptyTest") + # Note: __del__ is a 'Finalizer" not a 'Destructor'. + # https://docs.python.org/3/reference/datamodel.html#object.__del__ def __del__(self): if hasattr(self, "vpp"): - cls.vpp.poll() - if cls.vpp.returncode is None: - cls.vpp.terminate() - cls.vpp.communicate() + self.vpp.poll() + if self.vpp.returncode is None: + self.vpp.terminate() + self.vpp.communicate() @classmethod def setUpClass(cls, tempdir): |