# HG changeset patch # User Pierre-Yves David # Date 1354893038 -3600 # Node ID 5941cde49878ceeeaf4b04d6985497119079dbbf # Parent c88261b641a9dfb0b4dfaee1b8ac6b842fca6f75 [devtools] vreg becomes a class ppty After multiple devtools refactoring, the vreg used for test is now *always* got from the repository. Making this explicit is a step toward simplification of the vreg handling during various initialisation phases. Related to #2944813 diff -r c88261b641a9 -r 5941cde49878 devtools/testlib.py --- a/devtools/testlib.py Fri Nov 23 16:33:00 2012 +0100 +++ b/devtools/testlib.py Fri Dec 07 16:10:38 2012 +0100 @@ -251,11 +251,14 @@ # no direct assignation to cls.cnx anymore. # cnx is now an instance property that use a class protected attributes. cls.set_cnx(cnx) - cls.vreg = cls.repo.vreg cls.websession = dbapi.DBAPISession(cnx, cls.admlogin) cls._orig_cnx = (cnx, cls.websession) cls.config.repository = lambda x=None: cls.repo + @classproperty + def vreg(cls): + return cls.repo.vreg + def _close_cnx(self): for cnx in list(self._cnxs): if not cnx._closed: