From c5920c37a2b68d47decbdd11f9c46e3a283aa7b5 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Mon, 20 Aug 2007 17:31:57 +0000 Subject: Permit skipping of self tests and specify a folder for the spec file. Patch is mostly as supplied by eokyere@gmail.com with minor modifications. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@567764 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/tests/codec.py | 3 ++- qpid/python/tests/spec.py | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'qpid/python/tests') diff --git a/qpid/python/tests/codec.py b/qpid/python/tests/codec.py index 689a2cf4c1..f9f7aab918 100644 --- a/qpid/python/tests/codec.py +++ b/qpid/python/tests/codec.py @@ -23,6 +23,7 @@ from qpid.codec import Codec from qpid.spec import load from cStringIO import StringIO from qpid.reference import ReferenceId +from qpid.testlib import testrunner __doc__ = """ @@ -53,7 +54,7 @@ __doc__ = """ """ -SPEC = load("../specs/amqp.0-10-preview.xml") +SPEC = load(testrunner.get_spec_file("amqp.0-10-preview.xml")) # -------------------------------------- # -------------------------------------- diff --git a/qpid/python/tests/spec.py b/qpid/python/tests/spec.py index c70e4f9c4b..c00faad3ba 100644 --- a/qpid/python/tests/spec.py +++ b/qpid/python/tests/spec.py @@ -1,11 +1,11 @@ from unittest import TestCase from qpid.spec import load - +from qpid.testlib import testrunner class SpecTest(TestCase): def check_load(self, *urls): - spec = load(*urls) + spec = load(*map(testrunner.get_spec_file, urls)) qdecl = spec.method("queue_declare") assert qdecl != None assert not qdecl.content @@ -44,13 +44,13 @@ class SpecTest(TestCase): assert args.type == "table" def test_load_0_8(self): - self.check_load("../specs/amqp.0-8.xml") + self.check_load("amqp.0-8.xml") def test_load_0_9(self): - self.check_load("../specs/amqp.0-9.xml") + self.check_load("amqp.0-9.xml") def test_load_0_9_errata(self): - self.check_load("../specs/amqp.0-9.xml", "../specs/amqp-errata.0-9.xml") + self.check_load("amqp.0-9.xml", "amqp-errata.0-9.xml") def test_load_0_10(self): - self.check_load("../specs/amqp.0-10-preview.xml") + self.check_load("amqp.0-10-preview.xml") -- cgit v1.2.1