mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 04:53:07 -04:00
82 lines
2.7 KiB
Diff
82 lines
2.7 KiB
Diff
From 633d59b94f702eb36d51ea3e6a8285b64e7cf710 Mon Sep 17 00:00:00 2001
|
|
From: "James R. Barlow" <james@purplerock.ca>
|
|
Date: Thu, 3 Jul 2025 09:21:31 -0700
|
|
Subject: [PATCH 1/2] xfail Python logging bug in 3.13.3/4
|
|
|
|
---
|
|
tests/test_ghostscript.py | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
diff --git a/tests/test_ghostscript.py b/tests/test_ghostscript.py
|
|
index 1a511c44..1ddd07cb 100644
|
|
--- a/tests/test_ghostscript.py
|
|
+++ b/tests/test_ghostscript.py
|
|
@@ -6,6 +6,7 @@ from __future__ import annotations
|
|
import logging
|
|
import secrets
|
|
import subprocess
|
|
+import sys
|
|
from decimal import Decimal
|
|
from unittest.mock import patch
|
|
|
|
@@ -163,6 +164,10 @@ class TestDuplicateFilter:
|
|
logger.addFilter(DuplicateFilter(logger))
|
|
return logger
|
|
|
|
+ @pytest.mark.xfail(
|
|
+ (3, 13, 3) <= sys.version_info <= (3, 13, 5),
|
|
+ reason="https://github.com/python/cpython/pull/135858",
|
|
+ )
|
|
def test_filter_duplicate_messages(self, duplicate_filter_logger, caplog):
|
|
log = duplicate_filter_logger
|
|
log.error("test error message")
|
|
@@ -192,6 +197,10 @@ class TestDuplicateFilter:
|
|
assert caplog.records[1].msg == "another error message"
|
|
assert caplog.records[2].msg == "yet another error message"
|
|
|
|
+ @pytest.mark.xfail(
|
|
+ (3, 13, 3) <= sys.version_info <= (3, 13, 5),
|
|
+ reason="https://github.com/python/cpython/pull/135858",
|
|
+ )
|
|
def test_filter_alt_messages(self, duplicate_filter_logger, caplog):
|
|
log = duplicate_filter_logger
|
|
log.error("test error message")
|
|
--
|
|
2.50.0
|
|
|
|
|
|
From 664dffb9d7843c42acc8a7c5889f722872de0f9a Mon Sep 17 00:00:00 2001
|
|
From: "James R. Barlow" <james@purplerock.ca>
|
|
Date: Thu, 3 Jul 2025 11:30:05 -0700
|
|
Subject: [PATCH 2/2] Fix version test
|
|
|
|
---
|
|
tests/test_ghostscript.py | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/tests/test_ghostscript.py b/tests/test_ghostscript.py
|
|
index 1ddd07cb..417badaf 100644
|
|
--- a/tests/test_ghostscript.py
|
|
+++ b/tests/test_ghostscript.py
|
|
@@ -165,7 +165,7 @@ class TestDuplicateFilter:
|
|
return logger
|
|
|
|
@pytest.mark.xfail(
|
|
- (3, 13, 3) <= sys.version_info <= (3, 13, 5),
|
|
+ (3, 13, 3) <= sys.version_info[:3] <= (3, 13, 5),
|
|
reason="https://github.com/python/cpython/pull/135858",
|
|
)
|
|
def test_filter_duplicate_messages(self, duplicate_filter_logger, caplog):
|
|
@@ -198,7 +198,7 @@ class TestDuplicateFilter:
|
|
assert caplog.records[2].msg == "yet another error message"
|
|
|
|
@pytest.mark.xfail(
|
|
- (3, 13, 3) <= sys.version_info <= (3, 13, 5),
|
|
+ (3, 13, 3) <= sys.version_info[:3] <= (3, 13, 5),
|
|
reason="https://github.com/python/cpython/pull/135858",
|
|
)
|
|
def test_filter_alt_messages(self, duplicate_filter_logger, caplog):
|
|
--
|
|
2.50.0
|
|
|