From 10a354b46de2549846ed3a443ac476a5b457627a Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:31:52 +0000 Subject: [PATCH] fixup --- tests/conftest.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 27d46442..72b2767f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,20 +2,11 @@ import shutil import sys -import warnings - -# distutils is deprecated, but this is just a test, so not urgent to update -with warnings.catch_warnings(): - warnings.filterwarnings( - "ignore", - message=r"The distutils package", - category=DeprecationWarning, - ) - from distutils.dir_util import copy_tree # pylint: disable=E0611,W4901 from pathlib import Path from typing import TYPE_CHECKING, Iterator import pytest +from shutils import copytree # pylint: disable=E0611,W4901 if TYPE_CHECKING: from py._path.local import LocalPath @@ -140,9 +131,9 @@ def tmp_test_data(tmpdir: "LocalPath") -> Iterator[Path]: """ dirname = Path("tests/data") temp_dir = Path(tmpdir) - copy_tree(str(dirname), str(temp_dir / dirname)) + copytree(str(dirname), str(temp_dir / dirname)) yield dirname - copy_tree(str(temp_dir / dirname), str(dirname)) + copytree(str(temp_dir / dirname), str(dirname)) @pytest.fixture