Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53E4D17B97 for ; Mon, 26 Jan 2015 21:22:31 +0000 (UTC) Received: (qmail 8085 invoked by uid 500); 26 Jan 2015 21:22:31 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 8054 invoked by uid 500); 26 Jan 2015 21:22:31 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 8041 invoked by uid 99); 26 Jan 2015 21:22:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2015 21:22:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 460ABE03F2; Mon, 26 Jan 2015 21:22:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aconway@apache.org To: commits@qpid.apache.org Date: Mon, 26 Jan 2015 21:22:31 -0000 Message-Id: <7fc9266c566148ee94684e7443b43fde@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] qpid-proton git commit: PROTON-805: Improved integration between proton python test harness and unittest. 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 Authored: Mon Jan 26 15:55:31 2015 -0500 Committer: Alan Conway 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