diff --git a/python-pytest-examples.changes b/python-pytest-examples.changes index 723fef4..3019dab 100644 --- a/python-pytest-examples.changes +++ b/python-pytest-examples.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 19 16:35:18 UTC 2023 - Ondřej Súkup + +- add test-ruff-0.1.0.patch to fix tests with ruvv-0.1.0 + ------------------------------------------------------------------- Mon Oct 16 13:59:40 UTC 2023 - Ondřej Súkup diff --git a/python-pytest-examples.spec b/python-pytest-examples.spec index 722106e..c995768 100644 --- a/python-pytest-examples.spec +++ b/python-pytest-examples.spec @@ -21,19 +21,21 @@ Version: 0.0.10 Release: 0 Summary: Pytest plugin for testing examples in docstrings and markdown files License: MIT -URL: https://github.com/pydantic/pytest-examples +URL: https://github.com/pydantic/pytest-examples # sdist without tests Source: https://github.com/pydantic/pytest-examples/archive/refs/tags/v%{version}.tar.gz#/pytest-examples-%{version}.tar.gz -BuildRequires: python-rpm-macros -BuildRequires: %{python_module pip} +# PATCH-FIX-UPSTREAM test-ruff-0.1.0.patch - fix tests for ruff-0.1.0 +Patch0: test-ruff-0.1.0.patch +BuildRequires: %{python_module black} BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module ruff} -BuildRequires: %{python_module black} BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-black Requires: python-pytest Requires: python-ruff -Requires: python-black BuildArch: noarch %python_subpackages diff --git a/test-ruff-0.1.0.patch b/test-ruff-0.1.0.patch new file mode 100644 index 0000000..cca5fae --- /dev/null +++ b/test-ruff-0.1.0.patch @@ -0,0 +1,22 @@ +From cade1306918e9984d0d45d5e274d01b734b5fd3a Mon Sep 17 00:00:00 2001 +From: Anton Zhukharev +Date: Wed, 18 Oct 2023 09:38:34 +0300 +Subject: [PATCH] update tests for ruff>=0.1.0 + +--- + tests/test_run_examples.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_run_examples.py b/tests/test_run_examples.py +index 1dcfba1..4330d71 100644 +--- a/tests/test_run_examples.py ++++ b/tests/test_run_examples.py +@@ -114,7 +114,7 @@ def test_find_run_examples(example: CodeExample, eval_example: EvalExample): + ' my_file.md:2:8: F401 [*] `sys` imported but unused\n' + ' my_file.md:3:7: F821 Undefined name `missing`\n' + ' Found 2 errors.\n' +- ' [*] 1 potentially fixable with the --fix option.\n' ++ ' [*] 1 fixable with the `--fix` option.\n' + '=== short test summary info ===\n' + ) in output +