Accepting request 1119080 from home:mimi_vx:branches:devel:languages:python:pytest

- add test-ruff-0.1.0.patch to fix tests with ruvv-0.1.0

OBS-URL: https://build.opensuse.org/request/show/1119080
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-examples?expand=0&rev=4
This commit is contained in:
2023-10-19 16:36:48 +00:00
committed by Git OBS Bridge
parent f531461c7e
commit 8fd31d5232
3 changed files with 34 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 19 16:35:18 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
- 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 <mimi.vx@gmail.com> Mon Oct 16 13:59:40 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@@ -24,16 +24,18 @@ License: MIT
URL: https://github.com/pydantic/pytest-examples URL: https://github.com/pydantic/pytest-examples
# sdist without tests # sdist without tests
Source: https://github.com/pydantic/pytest-examples/archive/refs/tags/v%{version}.tar.gz#/pytest-examples-%{version}.tar.gz Source: https://github.com/pydantic/pytest-examples/archive/refs/tags/v%{version}.tar.gz#/pytest-examples-%{version}.tar.gz
BuildRequires: python-rpm-macros # PATCH-FIX-UPSTREAM test-ruff-0.1.0.patch - fix tests for ruff-0.1.0
BuildRequires: %{python_module pip} Patch0: test-ruff-0.1.0.patch
BuildRequires: %{python_module black}
BuildRequires: %{python_module hatchling} BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module ruff} BuildRequires: %{python_module ruff}
BuildRequires: %{python_module black}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-black
Requires: python-pytest Requires: python-pytest
Requires: python-ruff Requires: python-ruff
Requires: python-black
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages

22
test-ruff-0.1.0.patch Normal file
View File

@@ -0,0 +1,22 @@
From cade1306918e9984d0d45d5e274d01b734b5fd3a Mon Sep 17 00:00:00 2001
From: Anton Zhukharev <ancieg@altlinux.org>
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