14
0

- Add patch to fix tests with latest pyramid

0001-Adapt-tests-to-latest-pygments.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyramid-debugtoolbar?expand=0&rev=18
This commit is contained in:
2025-02-25 13:40:18 +00:00
committed by Git OBS Bridge
parent 1265c7031b
commit ba78cd32fd
3 changed files with 64 additions and 2 deletions

View File

@@ -0,0 +1,54 @@
From 54e7ea7dc7a0986213975419a6ea6566e2102835 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
Date: Tue, 25 Feb 2025 14:35:23 +0100
Subject: [PATCH] Adapt tests to latest pygments
---
tests/test_panels/test_sqla.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: pyramid_debugtoolbar-4.12.1/tests/test_panels/test_sqla.py
===================================================================
--- pyramid_debugtoolbar-4.12.1.orig/tests/test_panels/test_sqla.py
+++ pyramid_debugtoolbar-4.12.1/tests/test_panels/test_sqla.py
@@ -77,9 +77,9 @@ class _TestSQLAlchemyPanel(_TestDebugtoo
"""
self.assertIn(
- '<span style="color: #008800; font-weight: bold">SELECT</span>'
- '<span style="color: #bbbbbb"> </span>'
- '<span style="color: #008800; font-weight: bold">NULL</span>;',
+ '<span style="color: #080; font-weight: bold">SELECT</span>'
+ '<span style="color: #BBB"> </span>'
+ '<span style="color: #080; font-weight: bold">NULL</span>;',
resp.text,
)
@@ -88,11 +88,11 @@ class _TestSQLAlchemyPanel(_TestDebugtoo
These are rendered as comments
"""
self.assertIn(
- '<span style="color: #888888">-- [event] begin</span>',
+ '<span style="color: #888">-- [event] begin</span>',
resp.text,
)
self.assertIn(
- '<span style="color: #888888">-- [event] rollback</span>',
+ '<span style="color: #888">-- [event] rollback</span>',
resp.text,
)
@@ -101,11 +101,11 @@ class _TestSQLAlchemyPanel(_TestDebugtoo
These are rendered as comments
"""
self.assertIn(
- '<span style="color: #888888">-- [event] begin</span>',
+ '<span style="color: #888">-- [event] begin</span>',
resp.text,
)
self.assertIn(
- '<span style="color: #888888">-- [event] commit</span',
+ '<span style="color: #888">-- [event] commit</span',
resp.text,
)

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 25 13:38:57 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Add patch to fix tests with latest pyramid
0001-Adapt-tests-to-latest-pygments.patch
-------------------------------------------------------------------
Fri Feb 9 21:57:03 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyramid-debugtoolbar
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -26,6 +26,8 @@ Summary: An interactive HTML debugger for Pyramid application development
License: BSD-4-Clause AND ZPL-2.1 AND MIT
URL: https://docs.pylonsproject.org
Source: https://files.pythonhosted.org/packages/source/p/pyramid_debugtoolbar/pyramid_debugtoolbar-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 0001-Adapt-tests-to-latest-pygments.patch gh#Pylons/pyramid_debugtoolbar#393
Patch1: 0001-Adapt-tests-to-latest-pygments.patch
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module WebOb}
BuildRequires: %{python_module WebTest}
@@ -59,7 +61,7 @@ Summary: Documentation files for %{name}
Documentation and examples for %{name}.
%prep
%setup -q -n pyramid_debugtoolbar-%{version}
%autosetup -p1 -n pyramid_debugtoolbar-%{version}
rm -r demo/.gitignore demo/debugtoolbar_demo.egg-info
%build