Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Nov 10, 2024
1 parent 5bc1050 commit 10a354b
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 10a354b

Please sign in to comment.