diff --git a/requirements-dev.txt b/requirements-dev.txt index ebe1dac3..897b18d0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,6 @@ coverage>=4.2 cython>=0.25.1 flake8>=3.0.4 importlib-metadata;python_version<"3.8" -path.py>=11.5.0 pytest>=6.0.0 pytest-cov>=2.7.1 pytest-mock>=1.10.4 diff --git a/tests/test_distribution.py b/tests/test_distribution.py index 8fcc06cc..3c02a0e7 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -1,11 +1,11 @@ -import os +from pathlib import Path import pytest -from path import Path from . import initialize_git_repo_and_commit, prepare_project -DIST_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "../dist")) +DIR = Path(__file__).parent.resolve() +DIST_DIR = DIR.parent / "dist" # Test if package can be imported to allow testing on # conda-forge where ``pytest-virtualenv`` is not available. @@ -13,7 +13,7 @@ def test_source_distribution(virtualenv): - sdists = Path(DIST_DIR).files(match="*.tar.gz") if Path(DIST_DIR).exists() else [] + sdists = DIST_DIR.glob("*.tar.gz") if DIST_DIR.exists() else [] if not sdists: pytest.skip("no source distribution available") assert len(sdists) == 1 @@ -28,7 +28,7 @@ def test_source_distribution(virtualenv): def test_wheel(virtualenv): - wheels = Path(DIST_DIR).files(match="*.whl") if Path(DIST_DIR).exists() else [] + wheels = DIST_DIR.glob("*.whl") if DIST_DIR.exists() else [] if not wheels: pytest.skip("no wheel available") assert len(wheels) == 1