qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [1/2] qpid-proton git commit: PROTON-805: Improved integration between proton python test harness and unittest.
Date Mon, 26 Jan 2015 21:22:31 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 24bae3789 -> 270607f7f


PROTON-805: Improved integration between proton python test harness and unittest.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/3d418391
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/3d418391
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/3d418391

Branch: refs/heads/master
Commit: 3d4183913b8408569cbb881adf07f3c3b98dc15d
Parents: 24bae37
Author: Alan Conway <aconway@redhat.com>
Authored: Mon Jan 26 15:55:31 2015 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Mon Jan 26 16:17:12 2015 -0500

----------------------------------------------------------------------
 tests/python/proton-test            | 6 +++---
 tests/python/proton_tests/common.py | 5 ++++-
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3d418391/tests/python/proton-test
----------------------------------------------------------------------
diff --git a/tests/python/proton-test b/tests/python/proton-test
index c31f5d9..5efabfd 100755
--- a/tests/python/proton-test
+++ b/tests/python/proton-test
@@ -492,16 +492,16 @@ class MethodTest:
     if hasattr(inst, "setUp"):
       runner.run("setup", inst.setUp)
       if runner.halt(): return runner
-    elif hasattr(inst, "setup"):
+    if hasattr(inst, "setup"):
       runner.run("setup", inst.setup)
       if runner.halt(): return runner
 
     runner.run("test", test)
 
+    if hasattr(inst, "teardown"):
+      runner.run("teardown", inst.teardown)
     if hasattr(inst, "tearDown"):
       runner.run("teardown", inst.tearDown)
-    elif hasattr(inst, "teardown"):
-      runner.run("teardown", inst.teardown)
 
     return runner
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3d418391/tests/python/proton_tests/common.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/common.py b/tests/python/proton_tests/common.py
index d159214..dcebe1f 100644
--- a/tests/python/proton_tests/common.py
+++ b/tests/python/proton_tests/common.py
@@ -17,6 +17,7 @@
 # under the License.
 #
 
+from unittest import TestCase
 from random import randint
 from threading import Thread
 from socket import socket, AF_INET, SOCK_STREAM
@@ -80,9 +81,10 @@ def pump(transport1, transport2, buffer_size=1024):
 def isSSLPresent():
     return SSL.present()
 
-class Test(object):
+class Test(TestCase):
 
   def __init__(self, name):
+    super(Test, self).__init__(name)
     self.name = name
 
   def configure(self, config):
@@ -107,6 +109,7 @@ class Test(object):
   def verbose(self):
     return int(self.default("verbose", 0))
 
+
 class Skipped(Exception):
   skipped = True
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message