コード例 #1
0
    def check_symlink(self):
        """Check "latest" symlink behavior"""
        # if symlink already exists
        old_results = os.path.join(self.results_root, "OLD")
        os.mkdir(old_results)
        os.symlink(old_results, self.latest_symlink)
        assert os.path.islink(self.latest_symlink) and os.path.exists(
            self.latest_symlink)

        setup_results_directory(self.results_root, self.results_dir)
        self.validate_directories()

        # Try again if symlink exists and points to nothing
        os.rmdir(self.results_dir)
        assert os.path.islink(
            self.latest_symlink) and not os.path.exists(self.latest_symlink)
        setup_results_directory(self.results_root, self.results_dir)
        self.validate_directories()
コード例 #2
0
    def check_symlink(self):
        """Check "latest" symlink behavior"""

        # if symlink already exists
        old_results = os.path.join(self.results_root, "OLD")
        os.mkdir(old_results)
        os.symlink(old_results, self.latest_symlink)
        assert os.path.islink(self.latest_symlink) and os.path.exists(self.latest_symlink)

        setup_results_directory(self.results_root, self.results_dir)
        update_latest_symlink(self.results_root, self.results_dir)
        self.validate_directories()

        # Try again if symlink exists and points to nothing
        os.rmdir(self.results_dir)
        assert os.path.islink(self.latest_symlink) and not os.path.exists(self.latest_symlink)
        setup_results_directory(self.results_root, self.results_dir)
        update_latest_symlink(self.results_root, self.results_dir)
        self.validate_directories()
コード例 #3
0
 def check_creation(self):
     """Check results and symlink from scratch"""
     assert not os.path.exists(self.results_dir)
     setup_results_directory(self.results_root, self.results_dir)
     self.validate_directories()
コード例 #4
0
 def check_creation(self):
     """Check results and symlink from scratch"""
     assert not os.path.exists(self.results_dir)
     setup_results_directory(self.results_root, self.results_dir)
     update_latest_symlink(self.results_root, self.results_dir)
     self.validate_directories()