def destroy(self): """Remove all of the test environment data.""" env = EnvironmentStub(path=self.tracdir, destroying=True) env.destroy_db() self.destroy_repo() if os.path.exists(self.dirname): rmtree(self.dirname)
def tearDown(self): for repos in self._repomgr.get_real_repositories(): repos.close() self._repomgr.reload_repositories() StorageFactory._clean() self.env.reset_db() if os.path.isdir(self.repos_path): rmtree(self.repos_path)
def test_no_refs_dir(self): self._git_init(bare=True) rmtree(os.path.join(self.repos_path, 'refs')) self._dbrepoprov.add_repository('gitrepos', self.repos_path, 'git') self.assertRaises(TracError, self._repomgr.get_repository, 'gitrepos')
def tearDown(self): rmtree(self.env_path)
def tearDown(self): self.env.reset_db() if os.path.isdir(self.repos_path): rmtree(self.repos_path)
def tearDown(self): RepositoryManager(self.env).reload_repositories() StorageFactory._clean() self.env.reset_db() if os.path.isdir(self.repos_path): rmtree(self.repos_path)