Beispiel #1
0
    def output_dir(self, the_dir):
        """Declare where the output directory is.

        The output directory is deleted at the end of the test, unless the
        COVERAGE_KEEP_OUTPUT environment variable is set.

        """
        # To make sure tests are isolated, we always clean the directory at the
        # beginning of the test.
        clean(the_dir)

        if not os.environ.get("COVERAGE_KEEP_OUTPUT"):      # pragma: partial
            self.addCleanup(clean, the_dir)
Beispiel #2
0
    def output_dir(self, the_dir):
        """Declare where the output directory is.

        The output directory is deleted at the end of the test, unless the
        COVERAGE_KEEP_OUTPUT environment variable is set.

        """
        # To make sure tests are isolated, we always clean the directory at the
        # beginning of the test.
        clean(the_dir)

        if not os.environ.get("COVERAGE_KEEP_OUTPUT"):      # pragma: part covered
            self.addCleanup(clean, the_dir)
Beispiel #3
0
 def cleanup_output_dir(self, the_dir):
     """Clean up the output directory of the test."""
     if not os.environ.get("COVERAGE_KEEP_OUTPUT"):      # pragma: partial
         clean(the_dir)
Beispiel #4
0
 def cleanup_output_dir(self, the_dir):
     """Clean up the output directory of the test."""
     if not os.environ.get("COVERAGE_KEEP_OUTPUT"):  # pragma: partial
         clean(the_dir)