pytestconf.py
changeset 4777 7e37cb866e97
parent 4766 162b2b127b15
child 4796 a20edc0f8b30
equal deleted inserted replaced
4776:3bf51379baee 4777:7e37cb866e97
    19                 clean_repo_test_cls(cls)
    19                 clean_repo_test_cls(cls)
    20             #_gc_debug()
    20             #_gc_debug()
    21 
    21 
    22 def clean_repo_test_cls(cls):
    22 def clean_repo_test_cls(cls):
    23     if 'repo' in cls.__dict__:
    23     if 'repo' in cls.__dict__:
    24         if cls.repo.__dict__: # empty dict when already shutted down
    24         if cls.repo._shutting_down:
    25             cls.repo.shutdown()
    25             cls.repo.shutdown()
    26         del cls.repo
    26         del cls.repo
    27     for clsattr in ('cnx', '_orig_cnx', 'config', '_config', 'vreg', 'schema'):
    27     for clsattr in ('cnx', '_orig_cnx', 'config', '_config', 'vreg', 'schema'):
    28         if clsattr in cls.__dict__:
    28         if clsattr in cls.__dict__:
    29             delattr(cls, clsattr)
    29             delattr(cls, clsattr)