From ad8529753b913de66d5e4a958d0f2c24a34427e1 Mon Sep 17 00:00:00 2001 From: JoeWang1127 Date: Mon, 30 Sep 2024 20:49:01 +0000 Subject: [PATCH] use stardard lib --- library_generation/test/integration_tests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library_generation/test/integration_tests.py b/library_generation/test/integration_tests.py index 7166d1b2a4..541b912a99 100644 --- a/library_generation/test/integration_tests.py +++ b/library_generation/test/integration_tests.py @@ -21,8 +21,8 @@ import shutil import subprocess import unittest -from distutils.dir_util import copy_tree -from distutils.file_util import copy_file +from shutil import copytree +from shutil import copyfile from pathlib import Path from library_generation.model.generation_config import GenerationConfig from library_generation.model.generation_config import from_yaml @@ -269,14 +269,14 @@ def __prepare_golden_files( ): for library_name in library_names: if config.is_monorepo(): - copy_tree(f"{repo_dest}/{library_name}", f"{golden_dir}/{library_name}") - copy_tree( + copytree(f"{repo_dest}/{library_name}", f"{golden_dir}/{library_name}") + copytree( f"{repo_dest}/gapic-libraries-bom", f"{golden_dir}/gapic-libraries-bom", ) - copy_file(f"{repo_dest}/pom.xml", golden_dir) + copyfile(f"{repo_dest}/pom.xml", golden_dir) else: - copy_tree(f"{repo_dest}", f"{golden_dir}/{library_name}") + copytree(f"{repo_dest}", f"{golden_dir}/{library_name}") @classmethod def __run_entry_point_in_docker_container(