From 697804b81c867961f79ce649bbcbf62a75eac789 Mon Sep 17 00:00:00 2001 From: "David P. Caldwell" Date: Sun, 25 Jun 2023 18:46:56 -0400 Subject: [PATCH] Migrate away from py.path.local Pytest, when doing test discovery, issued the following error message: ``` The (fspath: py.path.local) argument to Feature is deprecated. Please use the (path: pathlib.Path) argument instead ``` This commit does that. --- pytest_eucalyptus/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytest_eucalyptus/plugin.py b/pytest_eucalyptus/plugin.py index 7f7e3bb9..0403fdc4 100644 --- a/pytest_eucalyptus/plugin.py +++ b/pytest_eucalyptus/plugin.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import os +from pathlib import Path import pytest from aloe.testclass import TestCase @@ -41,7 +42,7 @@ def pytest_collect_file(path, parent): """ if path.ext == ".feature": if hasattr(Feature, "from_parent"): - return Feature.from_parent(parent, fspath=path) + return Feature.from_parent(parent, path=Path(str(path))) else: return Feature(path, parent=parent)