Skip to content

Commit

Permalink
use shutil instead of distutils in test
Browse files Browse the repository at this point in the history
  • Loading branch information
yocabon committed Feb 28, 2024
1 parent 95acc20 commit 6c0d238
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_image_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2020-present NAVER Corp. Under BSD 3-clause license

import os.path as path
from distutils import dir_util
import shutil
import tempfile
import unittest
import sys
Expand Down Expand Up @@ -48,7 +48,7 @@ def test_import_image_folder_with_single_sensor(self):
# creates a folder with both images and sensors.txt
with tempfile.TemporaryDirectory() as tmpdirname_in, tempfile.TemporaryDirectory() as tmpdirname_out:
# copy images
dir_util.copy_tree(self.images_folder, tmpdirname_in)
shutil.copytree(self.images_folder, tmpdirname_in, dirs_exist_ok=True)
# copy sensors.txt
sensors_file_path = path.join(tmpdirname_in, 'sensors.txt')
with open(sensors_file_path, 'wt') as f:
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_import_image_folder_with_multiple_sensors(self):
# creates a folder with both images and sensors.txt
with tempfile.TemporaryDirectory() as tmpdirname_in, tempfile.TemporaryDirectory() as tmpdirname_out:
# copy images
dir_util.copy_tree(self.images_folder, tmpdirname_in)
shutil.copytree(self.images_folder, tmpdirname_in, dirs_exist_ok=True)
# make up sensors.txt
sensors_file_path = path.join(tmpdirname_in, 'sensors.txt')
with open(sensors_file_path, 'wt') as f:
Expand Down

0 comments on commit 6c0d238

Please sign in to comment.