diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2009-07-22 00:33:39 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2009-07-22 00:33:39 +0200 |
commit | d2a42fc7f36930a2eecb406f35cd1eabc5d3e9e8 (patch) | |
tree | 4f3b9dbd24d551f5947d09bd675c91eaf366e940 | |
parent | 771c71bd889633640ab3f5805ca866efcdeff651 (diff) | |
download | logilab-common-d2a42fc7f36930a2eecb406f35cd1eabc5d3e9e8.tar.gz |
turn datapath into a classmethod
-rw-r--r-- | testlib.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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. |