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)
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)
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)