summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2009-07-22 00:33:39 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2009-07-22 00:33:39 +0200
commitd2a42fc7f36930a2eecb406f35cd1eabc5d3e9e8 (patch)
tree4f3b9dbd24d551f5947d09bd675c91eaf366e940
parent771c71bd889633640ab3f5805ca866efcdeff651 (diff)
downloadlogilab-common-d2a42fc7f36930a2eecb406f35cd1eabc5d3e9e8.tar.gz
turn datapath into a classmethod
-rw-r--r--testlib.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/testlib.py b/testlib.py
index 2f5489e..22526c2 100644
--- a/testlib.py
+++ b/testlib.py
@@ -1090,9 +1090,10 @@ class TestCase(unittest.TestCase):
# instantiated for each test run)
datadir = classproperty(cached(datadir))
- def datapath(self, fname):
+ def datapath(cls, fname):
"""joins the object's datadir and `fname`"""
- return osp.join(self.datadir, fname)
+ return osp.join(cls.datadir, fname)
+ datapath = classmethod(datapath)
def set_description(self, descr):
"""sets the current test's description.