forked from pool/python-pytest-sugar
Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 9a3029b5c8 | |||
| 8c02279493 | |||
| 4995f2ffd3 |
59
drop-pytest6-support.patch
Normal file
59
drop-pytest6-support.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 05a1e912fd9f257f30709c7b56dfeef3079e1408 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
||||
Date: Fri, 12 Dec 2025 14:58:47 +0200
|
||||
Subject: [PATCH] Drop support for pytest 6
|
||||
|
||||
---
|
||||
.github/workflows/build-and-test.yaml | 4 ++--
|
||||
README.md | 2 +-
|
||||
pyproject.toml | 2 +-
|
||||
pytest_sugar.py | 6 +-----
|
||||
setup.py | 2 +-
|
||||
test_sugar.py | 8 ++------
|
||||
tox.ini | 2 +-
|
||||
7 files changed, 9 insertions(+), 17 deletions(-)
|
||||
|
||||
Index: pytest-sugar-1.1.1/pytest_sugar.py
|
||||
===================================================================
|
||||
--- pytest-sugar-1.1.1.orig/pytest_sugar.py
|
||||
+++ pytest-sugar-1.1.1/pytest_sugar.py
|
||||
@@ -287,12 +287,8 @@ class SugarTerminalReporter(TerminalRepo
|
||||
),
|
||||
bold=True,
|
||||
)
|
||||
- if int(pytest.__version__.split(".")[0]) <= 6:
|
||||
- hook_call_kwargs = {"startdir": self.startpath}
|
||||
- else:
|
||||
- hook_call_kwargs = {"start_path": self.startpath}
|
||||
lines = self.config.hook.pytest_report_header(
|
||||
- config=self.config, **hook_call_kwargs
|
||||
+ config=self.config, start_path=self.startpath
|
||||
)
|
||||
lines.reverse()
|
||||
for line in flatten(lines):
|
||||
Index: pytest-sugar-1.1.1/setup.py
|
||||
===================================================================
|
||||
--- pytest-sugar-1.1.1.orig/setup.py
|
||||
+++ pytest-sugar-1.1.1/setup.py
|
||||
@@ -41,7 +41,7 @@ setup(
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
platforms="any",
|
||||
- install_requires=["pytest>=6.2.0", "termcolor>=2.1.0"],
|
||||
+ install_requires=["pytest>=7", "termcolor>=2.1.0"],
|
||||
extras_require={
|
||||
"dev": [
|
||||
"black",
|
||||
Index: pytest-sugar-1.1.1/test_sugar.py
|
||||
===================================================================
|
||||
--- pytest-sugar-1.1.1.orig/test_sugar.py
|
||||
+++ pytest-sugar-1.1.1/test_sugar.py
|
||||
@@ -114,7 +114,7 @@ class TestTerminalReporter:
|
||||
def test_report_header(self, testdir):
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
- def pytest_report_header(startdir):
|
||||
+ def pytest_report_header(start_path):
|
||||
pass
|
||||
"""
|
||||
)
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6422e83258f5b0c04ce7c632176c7732cab5fdb909cb39cca5c9139f81276c0a
|
||||
size 14992
|
||||
BIN
pytest-sugar-1.1.1.tar.gz
LFS
Normal file
BIN
pytest-sugar-1.1.1.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 21 10:40:25 UTC 2026 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Make it compatible with pytest 9.0. Add upstream patch
|
||||
drop-pytest6-support.patch, gh#Teemu/pytest-sugar@05a1e912fd9f
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 14 18:27:57 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.1.1:
|
||||
* Adjust signature of SugarTerminalReporter to avoid conflicts
|
||||
with other pytest plugins
|
||||
- update to 1.1.0:
|
||||
* Add Playwright trace file detection and display support for
|
||||
failed tests
|
||||
* `--sugar-trace-dir`: Configure the directory name for
|
||||
Playwright trace files (default: test-results)
|
||||
* `--sugar-no-trace`: Disable Playwright trace file detection
|
||||
and display
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 1 20:51:57 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pytest-sugar
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-pytest-sugar
|
||||
Version: 1.0.0
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
Summary: Pretty printer for pytest progress
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/Frozenball/pytest-sugar
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-sugar/pytest-sugar-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM: drop-pytest6-support.patch gh#Teemu/pytest-sugar@05a1e912fd9f
|
||||
Patch0: drop-pytest6-support.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -40,7 +42,7 @@ BuildArch: noarch
|
||||
pytest-sugar is a plugin for py.test that shows failures and errors instantly and shows a progress bar.
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-sugar-%{version}
|
||||
%autosetup -p1 -n pytest-sugar-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
Reference in New Issue
Block a user