summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-02-04 11:40:09 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-02-04 11:40:09 +0000
commit9a4fa9567cef9c40f589d2bc3ac4b0ec9aceb079 (patch)
tree8c3fd35e06d6da422a0c5459a8237cd19c9d0336
parent1856ed8de010be1d697d1fccfa4f317c183fbecc (diff)
testsuite/common.py: A private variable of unittest.TestCase changed name in python 2.5.
Original commit message from CVS: * testsuite/common.py: A private variable of unittest.TestCase changed name in python 2.5. This fixes make check with python2.5
-rw-r--r--ChangeLog6
-rw-r--r--testsuite/common.py18
2 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a86c772..3dbc036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-04 Edward Hervey <edward@fluendo.com>
+
+ * testsuite/common.py:
+ A private variable of unittest.TestCase changed name in python 2.5.
+ This fixes make check with python2.5
+
2007-02-04 Rene Stadler <mail@renestadler.de>
reviewed by: Edward Hervey <edward@fluendo.com>
diff --git a/testsuite/common.py b/testsuite/common.py
index 159b664..10f83cc 100644
--- a/testsuite/common.py
+++ b/testsuite/common.py
@@ -149,15 +149,25 @@ class TestCase(unittest.TestCase):
"""
Override me by chaining up to me at the start of your setUp.
"""
- gst.debug('%s.%s' % (self.__class__.__name__,
- self.__testMethodName))
+ # Using private variables is BAD ! this variable changed name in
+ # python 2.5
+ try:
+ methodName = self.__testMethodName
+ except:
+ methodName = self._testMethodName
+ gst.debug('%s.%s' % (self.__class__.__name__, methodName))
self.gctrack()
def tearDown(self):
"""
Override me by chaining up to me at the end of your tearDown.
"""
- gst.debug('%s.%s' % (self.__class__.__name__,
- self.__testMethodName))
+ # Using private variables is BAD ! this variable changed name in
+ # python 2.5
+ try:
+ methodName = self.__testMethodName
+ except:
+ methodName = self._testMethodName
+ gst.debug('%s.%s' % (self.__class__.__name__, methodName))
self.gccollect()
self.gcverify()