equal
deleted
inserted
replaced
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) |