def main(): try: tmp_dir = tmp.create_dir() LOG.debug('Created tmp directory %s', tmp_dir) virt_builder_args = _process_args(sys.argv[1:], tmp_dir) _run_virt_builder(virt_builder_args) finally: tmp.remove_dir(tmp_dir) LOG.debug('Removed tmp directory %s', tmp_dir)
def test_remove_dir_ok(self, rmtree): tmp.remove_dir('/tmp/rejviz-builder-123') rmtree.assert_called_with('/tmp/rejviz-builder-123')