Edgewall Software

Changeset 12774


Ignore:
Timestamp:
May 11, 2014, 4:41:11 PM (11 years ago)
Author:
Jun Omae
Message:

1.0.2dev: avoid a TypeError from Storage.__del__ on Python interpreter's termination while running setup.py test -s tracopt.versioncontrol.git.tests.git_fs.suite (fixed #11505)

Location:
branches/1.0-stable/tracopt/versioncontrol/git
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0-stable/tracopt/versioncontrol/git/PyGIT.py

    r12720 r12774  
    226226        return self.__inst
    227227
     228    @classmethod
     229    def _clean(cls):
     230        """For testing purpose only"""
     231        with StorageFactory.__dict_lock:
     232            cls.__dict.clear()
     233            cls.__dict_nonweak.clear()
     234
    228235
    229236class Storage(object):
     
    231238
    232239    __SREV_MIN = 4 # minimum short-rev length
    233 
    234240
    235241    class RevCache(tuple):
  • branches/1.0-stable/tracopt/versioncontrol/git/tests/PyGIT.py

    r12747 r12774  
    2424from trac.util import create_file
    2525from trac.util.compat import close_fds
    26 from trac.versioncontrol.api import Changeset, DbRepositoryProvider
     26from trac.versioncontrol.api import Changeset, DbRepositoryProvider, \
     27                                    RepositoryManager
    2728from tracopt.versioncontrol.git.git_fs import GitConnector
    2829from tracopt.versioncontrol.git.PyGIT import GitCore, GitError, Storage, \
     
    168169
    169170    def tearDown(self):
     171        RepositoryManager(self.env).reload_repositories()
     172        StorageFactory._clean()
    170173        self.env.reset_db()
    171174        if os.path.isdir(self.repos_path):
  • branches/1.0-stable/tracopt/versioncontrol/git/tests/git_fs.py

    r12720 r12774  
    2929from trac.versioncontrol.web_ui.log import LogModule
    3030from trac.web.href import Href
     31from tracopt.versioncontrol.git.PyGIT import StorageFactory
    3132from tracopt.versioncontrol.git.git_fs import GitConnector
    3233
     
    5253
    5354    def tearDown(self):
     55        self._repomgr.reload_repositories()
     56        StorageFactory._clean()
    5457        self.env.reset_db()
    5558        if os.path.isdir(self.repos_path):
Note: See TracChangeset for help on using the changeset viewer.