From f6a541be707d725f65c59d1763b01b2e2d09fd91 Mon Sep 17 00:00:00 2001 From: jbannister Date: Fri, 16 Aug 2024 10:52:39 +0100 Subject: [PATCH] #224: Fix the use of Path and pin to a minimum version which includes the new is_dir() function. --- pytest-shutil/pytest_shutil/workspace.py | 2 +- pytest-shutil/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest-shutil/pytest_shutil/workspace.py b/pytest-shutil/pytest_shutil/workspace.py index d31378a..ce30319 100644 --- a/pytest-shutil/pytest_shutil/workspace.py +++ b/pytest-shutil/pytest_shutil/workspace.py @@ -136,7 +136,7 @@ def run(self, cmd, capture=False, check_rc=True, cd=None, shell=False, **kwargs) def teardown(self): if self.delete is not None and not self.delete: return - if hasattr(self, 'workspace') and self.workspace.isdir(): + if hasattr(self, 'workspace') and self.workspace.is_dir(): log.debug("") log.debug("=======================================================") log.debug("pytest_shutil deleting workspace %s" % self.workspace) diff --git a/pytest-shutil/setup.py b/pytest-shutil/setup.py index 43ed91e..686e4f1 100644 --- a/pytest-shutil/setup.py +++ b/pytest-shutil/setup.py @@ -21,7 +21,7 @@ 'execnet', 'contextlib2;python_version<"3"', 'pytest', - 'path; python_version >= "3.5"', + 'path>=16.12.0; python_version >= "3.5"', 'path.py; python_version < "3.5"', 'mock; python_version<"3.3"', 'termcolor'