Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-gp-libs for openSUSE:Factory checked in at 2024-04-15 20:17:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-gp-libs (Old) and /work/SRC/openSUSE:Factory/.python-gp-libs.new.26366 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-gp-libs" Mon Apr 15 20:17:55 2024 rev:3 rq:1167718 version:0.0.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-gp-libs/python-gp-libs.changes 2024-01-03 12:24:55.051322751 +0100 +++ /work/SRC/openSUSE:Factory/.python-gp-libs.new.26366/python-gp-libs.changes 2024-04-15 20:24:04.301020611 +0200 @@ -1,0 +2,8 @@ +Mon Apr 15 06:10:36 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 0.0.7: + * support pytest 8 + * ruff related reformatting + * pin only new versions as legacy versions are untested + +------------------------------------------------------------------- Old: ---- gp_libs-0.0.5.tar.gz New: ---- gp_libs-0.0.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-gp-libs.spec ++++++ --- /var/tmp/diff_new_pack.dYL7ZY/_old 2024-04-15 20:24:04.705035485 +0200 +++ /var/tmp/diff_new_pack.dYL7ZY/_new 2024-04-15 20:24:04.705035485 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-gp-libs # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,14 @@ Name: python-gp-libs -Version: 0.0.5 +Version: 0.0.7 Release: 0 Summary: Internal utilities for projects following git-pull python package spec License: MIT URL: https://gp-libs.git-pull.com Source: https://files.pythonhosted.org/packages/source/g/gp-libs/gp_libs-%{version}.tar.gz -BuildRequires: %{python_module docutils} -BuildRequires: %{python_module myst-parser} +BuildRequires: %{python_module docutils >= 0.20.1} +BuildRequires: %{python_module myst-parser >= 2.0.0} BuildRequires: %{python_module pip} BuildRequires: %{python_module poetry-core >= 1.0.0} BuildRequires: %{python_module wheel} @@ -34,8 +34,8 @@ BuildRequires: %{python_module pytest-rerunfailures} # /SECTION BuildRequires: fdupes -Requires: python-docutils -Requires: python-myst-parser +Requires: python-docutils >= 0.20.1 +Requires: python-myst-parser >= 2.0.0 BuildArch: noarch %python_subpackages ++++++ gp_libs-0.0.5.tar.gz -> gp_libs-0.0.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/PKG-INFO new/gp_libs-0.0.7/PKG-INFO --- old/gp_libs-0.0.5/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/gp_libs-0.0.7/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: gp-libs -Version: 0.0.5 +Version: 0.0.7 Summary: Internal utilities for projects following git-pull python package spec Home-page: https://gp-libs.git-pull.com License: MIT @@ -23,8 +23,8 @@ Classifier: Programming Language :: Python :: 3.12 Classifier: Topic :: System :: Shells Classifier: Topic :: Utilities -Requires-Dist: docutils -Requires-Dist: myst_parser (>=0.18.1) +Requires-Dist: docutils (>=0.20.1,<0.21.0) +Requires-Dist: myst_parser (>=2.0.0,<2.1.0) Project-URL: Bug Tracker, https://github.com/git-pull/gp-libs/issues Project-URL: Changes, https://github.com/git-pull/gp-libs/blob/master/CHANGES Project-URL: Documentation, https://gp-libs.git-pull.com @@ -181,6 +181,17 @@ $ pip install --user --upgrade --pre gp-libs ``` +# Minimum requirements + +To lift the development burden of supporting legacy APIs, as this package is +lightly used, minimum constraints have been pinned: + +- docutils: 0.20.1+ +- myst-parser: 2.0.0+ + +If you have even passing interested in supporting legacy versions, file an +issue on the tracker. + # More information - Python support: >= 3.8, pypy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/README.md new/gp_libs-0.0.7/README.md --- old/gp_libs-0.0.5/README.md 2023-12-03 10:54:20.492441700 +0100 +++ new/gp_libs-0.0.7/README.md 2024-03-24 20:54:38.375167600 +0100 @@ -148,6 +148,17 @@ $ pip install --user --upgrade --pre gp-libs ``` +# Minimum requirements + +To lift the development burden of supporting legacy APIs, as this package is +lightly used, minimum constraints have been pinned: + +- docutils: 0.20.1+ +- myst-parser: 2.0.0+ + +If you have even passing interested in supporting legacy versions, file an +issue on the tracker. + # More information - Python support: >= 3.8, pypy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/pyproject.toml new/gp_libs-0.0.7/pyproject.toml --- old/gp_libs-0.0.5/pyproject.toml 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/pyproject.toml 2024-03-24 20:54:38.379167600 +0100 @@ -1,6 +1,6 @@ [tool.poetry] name = "gp-libs" -version = "0.0.5" +version = "0.0.7" description = "Internal utilities for projects following git-pull python package spec" license = "MIT" authors = ["Tony Narlock <t...@git-pull.com>"] @@ -41,8 +41,8 @@ [tool.poetry.dependencies] python = "^3.8" -myst_parser = ">=0.18.1" -docutils = "*" +myst_parser = "~2.0.0" +docutils = "~0.20.1" [tool.poetry.group.docs.dependencies] ### Docs ### @@ -57,7 +57,7 @@ [tool.poetry.group.test.dependencies] ### Testing ### -pytest = "*" +pytest = "~7" pytest-rerunfailures = "*" pytest-watcher = "*" @@ -86,13 +86,18 @@ [tool.ruff] target-version = "py38" + +[tool.lint] select = [ "E", # pycodestyle "F", # pyflakes "I", # isort "UP", # pyupgrade + "A", # flake8-builtins "B", # flake8-bugbear "C4", # flake8-comprehensions + "COM", # flake8-commas + "EM", # flake8-errmsg "Q", # flake8-quotes "PTH", # flake8-use-pathlib "SIM", # flake8-simplify @@ -101,8 +106,11 @@ "RUF", # Ruff-specific rules "D", # pydocstyle ] +ignore = [ + "COM812", # missing trailing comma, ruff format conflict +] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = [ "src", "doctest_document", @@ -113,10 +121,10 @@ ] combine-as-imports = true -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "numpy" -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "*/__init__.py" = ["F401"] [tool.pytest.ini_options] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/src/doctest_docutils.py new/gp_libs-0.0.7/src/doctest_docutils.py --- old/gp_libs-0.0.5/src/doctest_docutils.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/src/doctest_docutils.py 2024-03-24 20:54:38.379167600 +0100 @@ -1,4 +1,5 @@ """Doctest module for docutils.""" + import doctest import functools import linecache @@ -26,8 +27,6 @@ blankline_re = re.compile(r"^\s*<BLANKLINE>", re.MULTILINE) doctestopt_re = re.compile(r"#\s*doctest:.+$", re.MULTILINE) -OptionSpec = t.Dict[str, t.Callable[[str], t.Any]] - def is_allowed_version(version: str, spec: str) -> bool: """Check `spec` satisfies `version` or not. @@ -84,7 +83,7 @@ test = code code = doctestopt_re.sub("", code) nodetype: t.Type[TextElement] = nodes.literal_block - if self.name in ("testsetup", "testcleanup") or "hide" in self.options: + if self.name in {"testsetup", "testcleanup"} or "hide" in self.options: nodetype = nodes.comment if self.arguments: groups = [x.strip() for x in self.arguments[0].split(",")] @@ -126,7 +125,8 @@ node["options"][flag] = True # Skip the test except InvalidSpecifier: self.state.document.reporter.warning( - "'%s' is not a valid pyversion option" % spec, line=self.lineno + "'%s' is not a valid pyversion option" % spec, + line=self.lineno, ) if "skipif" in self.options: node["skipif"] = self.options["skipif"] @@ -140,20 +140,19 @@ class TestsetupDirective(TestDirective): """Test setup directive.""" - option_spec: t.ClassVar[OptionSpec] = {"skipif": directives.unchanged_required} + option_spec = {"skipif": directives.unchanged_required} class TestcleanupDirective(TestDirective): """Test cleanup directive.""" - option_spec: t.ClassVar[OptionSpec] = {"skipif": directives.unchanged_required} + option_spec = {"skipif": directives.unchanged_required} class DoctestDirective(TestDirective): """Doctest directive.""" - option_spec: t.ClassVar[OptionSpec] = { - "hide": directives.flag, + option_spec = { "no-trim-doctest-flags": directives.flag, "options": directives.unchanged, "pyversion": directives.unchanged_required, @@ -195,10 +194,10 @@ class DocTestFinderNameDoesNotExist(ValueError): """Raised with doctest lookup name not provided.""" - def __init__(self, string: str): + def __init__(self, string: str) -> None: return super().__init__( "DocTestFinder.find: name must be given " - f"when string.__name__ doesn't exist: {type(string)!r}" + f"when string.__name__ doesn't exist: {type(string)!r}", ) @@ -214,7 +213,7 @@ self, verbose: bool = False, parser: "doctest.DocTestParser" = parser, - ): + ) -> None: """Create a new doctest finder. The optional argument `parser` specifies a class or function that should be used @@ -280,7 +279,7 @@ ) -> None: """Find tests for the given string, and add them to `tests`.""" if self._verbose: - print("Finding tests in %s" % name) + logger.info(f"Finding tests in {name}") # If we've already processed this string, then ignore it. if id(string) in seen: @@ -298,8 +297,8 @@ "source_lines": source_lines, "globs": globs, "seen": seen, - } - ) + }, + ), ) ext = pathlib.Path(name).suffix logger.debug(f"parse, ext: {ext}") @@ -328,7 +327,8 @@ settings = OptionParser(components=(Parser,)).get_default_values() doc = docutils.utils.new_document( - source_path=str(source_path), settings=settings + source_path=str(source_path), + settings=settings, ) parser.parse(string, doc) @@ -371,7 +371,9 @@ if sys.version_info < (3, 13): def _from_module( - self, module: t.Optional[t.Union[str, types.ModuleType]], object: object + self, + module: t.Optional[t.Union[str, types.ModuleType]], + object: object, # NOQA: A002 ) -> bool: """Return true if the given object lives in the given module. @@ -412,7 +414,7 @@ def __init__(self) -> None: return super().__init__( - "Package may only be specified for module-relative paths." + "Package may only be specified for module-relative paths.", ) @@ -437,12 +439,15 @@ global master if package and not module_relative: - raise TestDocutilsPackageRelativeError() + raise TestDocutilsPackageRelativeError # Keep the absolute file paths. This is needed for Include directies to work. # The absolute path will be applied to source_path when creating the docutils doc. text, _ = doctest._load_testfile( # type: ignore - filename, package, module_relative, encoding or "utf-8" + filename, + package, + module_relative, + encoding or "utf-8", ) # If no name was given, then use the file's name. @@ -549,7 +554,7 @@ if args.fail_fast: options |= doctest.FAIL_FAST for filename in testfiles: - if filename.endswith(".rst") or filename.endswith(".md") or args.docutils: + if filename.endswith((".rst", ".md")) or args.docutils: failures, _ = testdocutils( filename, module_relative=False, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/src/gp_libs.py new/gp_libs-0.0.7/src/gp_libs.py --- old/gp_libs-0.0.5/src/gp_libs.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/src/gp_libs.py 2024-03-24 20:54:38.379167600 +0100 @@ -1,8 +1,9 @@ """Metadata package for gp-libs.""" + __title__ = "gp-libs" __package_name__ = "gp_libs" __description__ = "Internal utilities for git-pull projects" -__version__ = "0.0.5" +__version__ = "0.0.7" __author__ = "Tony Narlock" __github__ = "https://github.com/git-pull/gp-libs" __docs__ = "https://gp-libs.git-pull.com" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/src/linkify_issues.py new/gp_libs-0.0.7/src/linkify_issues.py --- old/gp_libs-0.0.5/src/linkify_issues.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/src/linkify_issues.py 2024-03-24 20:54:38.379167600 +0100 @@ -1,4 +1,5 @@ """Autolinking extension for Sphinx.""" + import re import typing as t @@ -29,17 +30,17 @@ assert issue_re.groups == 1 def condition(node: nodes.Node) -> bool: - cond = ( + return ( isinstance(node, nodes.Text) and len(re.findall(issue_re, node.astext())) > 0 ) and not isinstance( - node.parent, (nodes.literal, nodes.FixedTextElement, nodes.reference) + node.parent, + (nodes.literal, nodes.FixedTextElement, nodes.reference), ) - return cond for node in findall(self.document)(condition): text = node.astext() - retnodes = [] + retnodes: t.List[t.Union[nodes.reference, nodes.Text]] = [] pos = 0 for match in issue_re.finditer(text): if match.start() > pos: @@ -74,7 +75,9 @@ app.add_transform(LinkifyIssues) app.add_config_value("issue_re", re.compile(DEFAULT_ISSUE_RE), "env") app.add_config_value( - "issue_url_tpl", r"https://github.com/git-pull/gp-libs/issues/{issue_id}", "env" + "issue_url_tpl", + r"https://github.com/git-pull/gp-libs/issues/{issue_id}", + "env", ) return SetupDict( @@ -82,5 +85,5 @@ "version": "0.1", "parallel_read_safe": True, "parallel_write_safe": True, - } + }, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/src/pytest_doctest_docutils.py new/gp_libs-0.0.7/src/pytest_doctest_docutils.py --- old/gp_libs-0.0.5/src/pytest_doctest_docutils.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/src/pytest_doctest_docutils.py 2024-03-24 20:54:38.383167700 +0100 @@ -72,7 +72,8 @@ def pytest_collect_file( - file_path: pathlib.Path, parent: pytest.Collector + file_path: pathlib.Path, + parent: pytest.Collector, ) -> t.Optional[t.Union["DocTestDocutilsFile", "_pytest.doctest.DoctestModule"]]: """Test collector for pytest-doctest-docutils.""" config = parent.config @@ -82,10 +83,11 @@ ( _pytest.doctest._is_setup_py(file_path), _pytest.doctest._is_main_py(file_path), - ) + ), ): mod: t.Union[ - DocTestDocutilsFile, _pytest.doctest.DoctestModule + DocTestDocutilsFile, + _pytest.doctest.DoctestModule, ] = _pytest.doctest.DoctestModule.from_parent(parent, path=file_path) return mod elif _is_doctest(config, file_path, parent): @@ -94,9 +96,11 @@ def _is_doctest( - config: pytest.Config, path: pathlib.Path, parent: pytest.Collector + config: pytest.Config, + path: pathlib.Path, + parent: pytest.Collector, ) -> bool: - if path.suffix in (".rst", ".md") and parent.session.isinitpath(path): + if path.suffix in {".rst", ".md"} and parent.session.isinitpath(path): return True globs = config.getoption("doctestglob") or ["*.rst", "*.md"] return any(path.match(path_pattern=glob) for glob in globs) @@ -142,7 +146,9 @@ test: "doctest.DocTest", example: "doctest.Example", exc_info: t.Tuple[ - t.Type[BaseException], BaseException, types.TracebackType + t.Type[BaseException], + BaseException, + types.TracebackType, ], ) -> None: if isinstance(exc_info[1], OutcomeException): @@ -159,6 +165,70 @@ return PytestDoctestRunner +def _get_allow_unicode_flag() -> int: + """Register and return the ALLOW_UNICODE flag.""" + import doctest + + return doctest.register_optionflag("ALLOW_UNICODE") + + +def _get_allow_bytes_flag() -> int: + """Register and return the ALLOW_BYTES flag.""" + import doctest + + return doctest.register_optionflag("ALLOW_BYTES") + + +def _get_number_flag() -> int: + """Register and return the NUMBER flag.""" + import doctest + + return doctest.register_optionflag("NUMBER") + + +def _get_flag_lookup() -> t.Dict[str, int]: + import doctest + + return { + "DONT_ACCEPT_TRUE_FOR_1": doctest.DONT_ACCEPT_TRUE_FOR_1, + "DONT_ACCEPT_BLANKLINE": doctest.DONT_ACCEPT_BLANKLINE, + "NORMALIZE_WHITESPACE": doctest.NORMALIZE_WHITESPACE, + "ELLIPSIS": doctest.ELLIPSIS, + "IGNORE_EXCEPTION_DETAIL": doctest.IGNORE_EXCEPTION_DETAIL, + "COMPARISON_FLAGS": doctest.COMPARISON_FLAGS, + "ALLOW_UNICODE": _get_allow_unicode_flag(), + "ALLOW_BYTES": _get_allow_bytes_flag(), + "NUMBER": _get_number_flag(), + } + + +def get_optionflags(config: pytest.Config) -> int: + """Fetch optionflags from pytest configuration. + + Extracted from pytest.doctest 8.0 (license: MIT). + """ + optionflags = config.getini("doctest_optionflags") + # It takes this rocket surgery to satisfy mypy + optionflags_str = ( + [str(i) for i in optionflags] + if isinstance(optionflags, list) + and all( + isinstance( + item, + str, + ) + for item in optionflags + ) + else [] + ) + + flag_lookup_table = _get_flag_lookup() + flag_acc = 0 + for flag in optionflags_str: + flag_acc |= flag_lookup_table[flag] + return flag_acc + + def _get_runner( checker: t.Optional["doctest.OutputChecker"] = None, verbose: t.Optional[bool] = None, @@ -183,7 +253,9 @@ """DocTestRunner for doctest_docutils.""" def summarize( # type: ignore - self, out: "_Out", verbose: t.Optional[bool] = None + self, + out: "_Out", + verbose: t.Optional[bool] = None, ) -> t.Tuple[int, int]: """Summarize the test runs.""" string_io = io.StringIO() @@ -197,7 +269,9 @@ return res def _DocTestRunner__patched_linecache_getlines( - self, filename: str, module_globals: t.Any = None + self, + filename: str, + module_globals: t.Any = None, ) -> t.Any: # this is overridden from DocTestRunner adding the try-except below m = self._DocTestRunner__LINECACHE_FILENAME_RE.match(filename) # type: ignore @@ -227,15 +301,13 @@ # Uses internal doctest module parsing mechanism. finder = DocutilsDocTestFinder() - optionflags = _pytest.doctest.get_optionflags(self) # type: ignore + optionflags = get_optionflags(self.config) runner = _get_runner( verbose=False, optionflags=optionflags, checker=_pytest.doctest._get_checker(), - continue_on_failure=_pytest.doctest._get_continue_on_failure( # type:ignore - self.config - ), + continue_on_failure=_pytest.doctest._get_continue_on_failure(self.config), # type: ignore ) from _pytest.doctest import DoctestItem diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/tests/conftest.py new/gp_libs-0.0.7/tests/conftest.py --- old/gp_libs-0.0.5/tests/conftest.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/tests/conftest.py 2024-03-24 20:54:38.383167700 +0100 @@ -7,6 +7,7 @@ See "pytest_plugins in non-top-level conftest files" in https://docs.pytest.org/en/stable/deprecations.html """ + import pathlib import typing as t @@ -32,12 +33,12 @@ ... -@pytest.fixture(scope="function") +@pytest.fixture() def make_app_params( request: pytest.FixtureRequest, app_params: AppParams, tmp_path: pathlib.Path, -) -> t.Generator[t.Callable[[t.Any], AppParams], None, None]: +) -> t.Callable[[t.Any], AppParams]: """Return Sphinx App factory, accepts custom params.""" def fn( @@ -72,4 +73,4 @@ return args, kws - yield fn + return fn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/tests/test_doctest_docutils.py new/gp_libs-0.0.7/tests/test_doctest_docutils.py --- old/gp_libs-0.0.5/tests/test_doctest_docutils.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/tests/test_doctest_docutils.py 2024-03-24 20:54:38.383167700 +0100 @@ -1,4 +1,5 @@ """Tests for doctest_docutils.""" + import doctest import pathlib import textwrap @@ -32,8 +33,8 @@ """ >>> 4 + 4 8 - """ - ) + """, + ), }, tests_found=1, ), @@ -46,8 +47,8 @@ >>> 4 + 4 8 - """ - ) + """, + ), }, tests_found=1, ), @@ -63,8 +64,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -77,8 +78,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -91,8 +92,8 @@ >>> 4 + 4 8 - """ - ) + """, + ), }, tests_found=1, ), @@ -106,8 +107,8 @@ >>> 4 + 4 8 ::: - """ - ) + """, + ), }, tests_found=1, ), @@ -121,8 +122,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -138,8 +139,8 @@ >>> 4 + 4 8 ::: - """ - ) + """, + ), }, tests_found=1, ), @@ -155,8 +156,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -179,8 +180,8 @@ 6 ``` ```` - """ - ) + """, + ), }, tests_found=2, ), @@ -195,7 +196,9 @@ @pytest.mark.parametrize( - DocTestFinderFixture._fields, FIXTURES, ids=[f.test_id for f in FIXTURES] + DocTestFinderFixture._fields, + FIXTURES, + ids=[f.test_id for f in FIXTURES], ) @pytest.mark.parametrize("file_path_mode", ["relative", "absolute"]) def test_DocutilsDocTestFinder( @@ -230,7 +233,10 @@ # Test finder = doctest_docutils.DocutilsDocTestFinder() text, _ = doctest._load_testfile( # type: ignore - str(first_test_filename), package=None, module_relative=False, encoding="utf-8" + str(first_test_filename), + package=None, + module_relative=False, + encoding="utf-8", ) tests = finder.find(text, str(first_test_filename)) tests.sort(key=lambda test: test.name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/tests/test_linkify_issues.py new/gp_libs-0.0.7/tests/test_linkify_issues.py --- old/gp_libs-0.0.5/tests/test_linkify_issues.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/tests/test_linkify_issues.py 2024-03-24 20:54:38.383167700 +0100 @@ -1,4 +1,5 @@ """Tests for linkify_issues extension for sphinx.""" + import pathlib import typing as t @@ -40,7 +41,9 @@ @pytest.mark.parametrize( - LinkTestFixture._fields, FIXTURES, ids=[f.test_id for f in FIXTURES] + LinkTestFixture._fields, + FIXTURES, + ids=[f.test_id for f in FIXTURES], ) def test_links_show( make_app: t.Callable[[t.Any], SphinxTestApp], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gp_libs-0.0.5/tests/test_pytest_doctest_docutils.py new/gp_libs-0.0.7/tests/test_pytest_doctest_docutils.py --- old/gp_libs-0.0.5/tests/test_pytest_doctest_docutils.py 2023-12-03 10:54:20.496441600 +0100 +++ new/gp_libs-0.0.7/tests/test_pytest_doctest_docutils.py 2024-03-24 20:54:38.383167700 +0100 @@ -1,4 +1,5 @@ """Test pytest plugin for doctest_docutils.""" + import textwrap import typing as t @@ -30,8 +31,8 @@ """ >>> 4 + 4 8 - """ - ) + """, + ), }, tests_found=1, ), @@ -44,8 +45,8 @@ >>> 4 + 4 8 - """ - ) + """, + ), }, tests_found=1, ), @@ -61,8 +62,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -75,8 +76,8 @@ >>> 4 + 4 8 - """ - ) + """, + ), }, tests_found=1, ), @@ -90,8 +91,8 @@ >>> 4 + 4 8 ::: - """ - ) + """, + ), }, tests_found=1, ), @@ -105,8 +106,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -122,8 +123,8 @@ >>> 4 + 4 8 ::: - """ - ) + """, + ), }, tests_found=1, ), @@ -139,8 +140,8 @@ >>> 4 + 4 8 ``` - """ - ) + """, + ), }, tests_found=1, ), @@ -160,8 +161,8 @@ ''' print(statement) - """ - ) + """, + ), }, tests_found=1, ), @@ -184,8 +185,8 @@ 6 ``` ```` - """ - ) + """, + ), }, tests_found=2, ), @@ -193,7 +194,9 @@ @pytest.mark.parametrize( - PytestDocTestFinderFixture._fields, FIXTURES, ids=[f.test_id for f in FIXTURES] + PytestDocTestFinderFixture._fields, + FIXTURES, + ids=[f.test_id for f in FIXTURES], ) def test_pluginDocutilsDocTestFinder( pytester: _pytest.pytester.Pytester, @@ -212,7 +215,7 @@ [pytest] addopts=-p no:doctest -vv - """.strip() + """.strip(), ), ) tests_path = pytester.path / "tests" @@ -247,7 +250,7 @@ [pytest] addopts=-p no:doctest -vv - """.strip() + """.strip(), ), ) pytester.makeconftest( @@ -267,8 +270,8 @@ def add(a: int, b: int) -> int: return a + b doctest_namespace["add"] = add - """ - ) + """, + ), ) tests_path = pytester.path / "tests" files = { @@ -282,8 +285,8 @@ ''' print(statement) - """ - ) + """, + ), } first_test_key = next(iter(files.keys())) first_test_filename = str(tests_path / first_test_key) @@ -319,7 +322,7 @@ [pytest] addopts=-p no:doctest -vv - """.strip() + """.strip(), ), ) pytester.makeconftest( @@ -339,8 +342,8 @@ def add(a: int, b: int) -> int: return a + b doctest_namespace["add"] = add - """ - ) + """, + ), ) tests_path = pytester.path / "tests" files = { @@ -375,8 +378,8 @@ >>> add(5, 1) 6 ``` - """ - ) + """, + ), } first_test_key = next(iter(files.keys())) first_test_filename = str(tests_path / first_test_key)