Ejemplo n.º 1
0
    def destroy(self):
        """Remove all of the test environment data."""
        env = EnvironmentStub(path=self.tracdir, destroying=True)
        env.destroy_db()
        env.shutdown()

        self.destroy_repo()
        if os.path.exists(self.dirname):
            rmtree(self.dirname)
Ejemplo n.º 2
0
    def destroy(self):
        """Remove all of the test environment data."""
        env = EnvironmentStub(path=self.tracdir, destroying=True)
        env.destroy_db()
        env.shutdown()

        self.destroy_repo()
        if os.path.exists(self.dirname):
            rmtree(self.dirname)
Ejemplo n.º 3
0
 def destroy(self):
     self._shutdown_environment()
     self._destroy_database(self.get_db_url())
     if os.path.exists(self.dirname):
         for i in range(5):
             try:
                 rmtree(self.dirname)
                 break
             except OSError:
                 # The idea is that sometimes we need to wait for a short
                 # time until all file handles are closed (e.g. tracd is
                 # really shut down) so that we can delete the files on
                 # Windows.
                 time.sleep(0.5)
Ejemplo n.º 4
0
 def destroy(self):
     self._shutdown_environment()
     self._destroy_database(self.get_db_url())
     if os.path.exists(self.dirname):
         for i in range(5):
             try:
                 rmtree(self.dirname)
                 break
             except OSError:
                 # The idea is that sometimes we need to wait for a short
                 # time until all file handles are closed (e.g. tracd is
                 # really shut down) so that we can delete the files on
                 # Windows.
                 time.sleep(0.5)