Skip to content

Commit ae5066c

Browse files
committed
remove deprecated LEGACY_PATH support.
Pytest 8.1.0 removed support for that. No need to change our supported Pytest range, the modern pathlib.Path support has been there since Pytest 7.0
1 parent 7493f2e commit ae5066c

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py)
2929
DEVPKGS=-rdev-requirements.txt -rtest-requirements.txt -rmypy-requirements.txt
3030
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3131
python-flake8 python-mock shellcheck
32-
VERSION=2.4.$(shell TZ=UTC git log --first-parent --max-count=1 \
32+
VERSION=2.5.$(shell TZ=UTC git log --first-parent --max-count=1 \
3333
--format=format:%cd --date=format-local:%Y%m%d%H%M%S)
3434

3535
## all : default task (install in dev mode)

cwltest/argparser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Command line argument parsing for cwltest."""
2+
23
import argparse
34
import sys
45
from importlib.metadata import PackageNotFoundError, version

cwltest/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Discovers CWL test files and converts them to pytest.Items."""
2+
23
import argparse
34
import json
45
import os
@@ -27,7 +28,6 @@
2728

2829
if TYPE_CHECKING:
2930
from _pytest._code.code import ExceptionInfo, _TracebackStyle
30-
from _pytest.compat import LEGACY_PATH
3131
from _pytest.config import Config
3232
from _pytest.config import Config as PytestConfig
3333
from _pytest.config import PytestPluginManager
@@ -198,7 +198,7 @@ def repr_failure(
198198

199199
def reportinfo(self) -> Tuple[Union["os.PathLike[str]", str], Optional[int], str]:
200200
"""Status report."""
201-
return self.fspath, 0, "cwl test: %s" % self.name
201+
return self.path, 0, "cwl test: %s" % self.name
202202

203203

204204
class CWLYamlFile(pytest.File):
@@ -342,7 +342,7 @@ def _doc_options() -> argparse.ArgumentParser:
342342

343343

344344
def pytest_collect_file(
345-
file_path: Path, path: "LEGACY_PATH", parent: pytest.Collector
345+
file_path: Path, parent: pytest.Collector
346346
) -> Optional[pytest.Collector]:
347347
"""Is this file for us."""
348348
if (

docs/pytest.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Pytest plugin
33
*************
44

5-
``cwltest`` can also be used as a Pytest plugin. The CWL test filename must
6-
end with ``.cwltest.yml`` or ``.cwltest.yaml``.
5+
``cwltest`` can also be used as a Pytest 7.x or 8.x plugin. The CWL test
6+
filename must end with ``.cwltest.yml`` or ``.cwltest.yaml``.
77

88
In this case, the simple command::
99

tests/test_prepare.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test prepare_test_command()"""
2+
23
import os
34

45
from cwltest import utils

tests/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test functions."""
2+
23
import atexit
34
import os
45
import subprocess # nosec

0 commit comments

Comments
 (0)