From 2e79c7796c00590abe98cfc77b7a943fa495469d Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Wed, 17 Apr 2024 18:11:16 +0300 Subject: [PATCH] tests/conftest.py: Do not use distutil It was deprecated in 3.10 and dropped in 3.12: https://docs.python.org/3.11/whatsnew/3.10.html#distutils. Signed-off-by: Pavel Karpy --- pytest_tests/tests/conftest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytest_tests/tests/conftest.py b/pytest_tests/tests/conftest.py index 23eeb1663..66ff3a2b6 100644 --- a/pytest_tests/tests/conftest.py +++ b/pytest_tests/tests/conftest.py @@ -2,7 +2,6 @@ import os import shutil import time -from distutils import dir_util import allure import pytest @@ -205,6 +204,6 @@ def datadir(tmpdir, request): test_dir, _ = os.path.splitext(filename) if os.path.isdir(test_dir): - dir_util.copy_tree(test_dir, str(tmpdir)) + shutil.copytree(test_dir, str(tmpdir), dirs_exist_ok=True) return tmpdir