diff options
author | jfarrell <jfarrell@apache.org> | 2015-06-23 21:58:50 -0400 |
---|---|---|
committer | jfarrell <jfarrell@apache.org> | 2015-06-23 21:58:50 -0400 |
commit | 6cdbd98b717b9f2b720ce7dc2899fbada94876f9 (patch) | |
tree | 08190741e2550566f194c5567970a7e68fe20e60 /test/py.twisted | |
parent | 417b631c5a80c78eda58824a824782b15455ccc4 (diff) | |
download | thrift-6cdbd98b717b9f2b720ce7dc2899fbada94876f9.tar.gz |
Thrift-2922: TRIAL is used with Python tests but not tested accordingly
Client: py
Patch: jfarrell
Updated configure.ac to require trial for py.twisted tests
Diffstat (limited to 'test/py.twisted')
-rw-r--r-- | test/py.twisted/Makefile.am | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | test/py.twisted/test_suite.py | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/test/py.twisted/Makefile.am b/test/py.twisted/Makefile.am index 17baa599f..5020215d7 100644 --- a/test/py.twisted/Makefile.am +++ b/test/py.twisted/Makefile.am @@ -24,7 +24,7 @@ stubs: ../ThriftTest.thrift ../SmallTest.thrift $(THRIFT) --gen py:twisted ../SmallTest.thrift check: stubs - $(TRIAL) test_suite.py + $(TRIAL) ./test_suite.py clean-local: $(RM) -r gen-py.twisted diff --git a/test/py.twisted/test_suite.py b/test/py.twisted/test_suite.py index 26c1ee2a1..048abc5bc 100644..100755 --- a/test/py.twisted/test_suite.py +++ b/test/py.twisted/test_suite.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -17,9 +19,10 @@ # under the License. # -import sys, glob, time -sys.path.insert(0, './gen-py.twisted') -sys.path.insert(0, glob.glob('../../lib/py/build/lib.*')[0]) +import sys, os, glob, time +basepath = os.path.abspath(os.path.dirname(__file__)) +sys.path.insert(0, os.path.join(basepath, 'gen-py.twisted')) +sys.path.insert(0, glob.glob(os.path.join(basepath, '../../lib/py/build/lib.*'))[0]) from ThriftTest import ThriftTest from ThriftTest.ttypes import Xception, Xtruct @@ -147,8 +150,8 @@ class ThriftTestCase(unittest.TestCase): def testDouble(self): self.assertEquals((yield self.client.testDouble(-5.235098235)), -5.235098235) - # TODO: def testBinary(self) ... - + # TODO: def testBinary(self) ... + @defer.inlineCallbacks def testStruct(self): x = Xtruct() |