From d2a42fc7f36930a2eecb406f35cd1eabc5d3e9e8 Mon Sep 17 00:00:00 2001 From: Sylvain Th?nault Date: Wed, 22 Jul 2009 00:33:39 +0200 Subject: turn datapath into a classmethod --- testlib.py | 5 +++-- 1 file 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. -- cgit v1.2.1