Skip to content

remove deprecated LEGACY_PATH support. #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py)
DEVPKGS=-rdev-requirements.txt -rtest-requirements.txt -rmypy-requirements.txt
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
python-flake8 python-mock shellcheck
VERSION=2.4.$(shell TZ=UTC git log --first-parent --max-count=1 \
VERSION=2.5.$(shell TZ=UTC git log --first-parent --max-count=1 \
--format=format:%cd --date=format-local:%Y%m%d%H%M%S)

## all : default task (install in dev mode)
1 change: 1 addition & 0 deletions cwltest/argparser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command line argument parsing for cwltest."""

import argparse
import sys
from importlib.metadata import PackageNotFoundError, version
6 changes: 3 additions & 3 deletions cwltest/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Discovers CWL test files and converts them to pytest.Items."""

import argparse
import json
import os
@@ -27,7 +28,6 @@

if TYPE_CHECKING:
from _pytest._code.code import ExceptionInfo, _TracebackStyle
from _pytest.compat import LEGACY_PATH
from _pytest.config import Config
from _pytest.config import Config as PytestConfig
from _pytest.config import PytestPluginManager
@@ -198,7 +198,7 @@ def repr_failure(

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


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


def pytest_collect_file(
file_path: Path, path: "LEGACY_PATH", parent: pytest.Collector
file_path: Path, parent: pytest.Collector
) -> Optional[pytest.Collector]:
"""Is this file for us."""
if (
4 changes: 2 additions & 2 deletions docs/pytest.rst
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
Pytest plugin
*************

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

In this case, the simple command::

1 change: 1 addition & 0 deletions tests/test_prepare.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test prepare_test_command()"""

import os

from cwltest import utils
1 change: 1 addition & 0 deletions tests/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test functions."""

import atexit
import os
import subprocess # nosec