File: py313-regex-compilation-error-check.patch

package info (click to toggle)
python-ruffus 2.8.4-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,492 kB
  • sloc: python: 17,613; makefile: 213; sh: 18
file content (23 lines) | stat: -rw-r--r-- 1,497 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Ananthu C V <weepingclown@debian.org>
Date: Sun, 8 Mar 2026 11:17:36 +0100
Subject: Fix regex compilation error assertion for python3.13

Last-Update: 2024-12-05
---
 ruffus/test/test_ruffus_utility.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ruffus/test/test_ruffus_utility.py b/ruffus/test/test_ruffus_utility.py
index 61269b1..0f27144 100755
--- a/ruffus/test/test_ruffus_utility.py
+++ b/ruffus/test/test_ruffus_utility.py
@@ -278,7 +278,8 @@ class Test_compile_regex (unittest.TestCase):
         except Exception as e:
             self.assertTrue(e.args == ('Dummy Task', "test1: regular expression regex('.*)') is malformed\n[sre_constants.error: (unbalanced parenthesis at position 2)]") or
                             e.args == ('Dummy Task', "test1: regular expression regex('.*)') is malformed\n[sre_constants.error: (unbalanced parenthesis)]") or
-                            e.args == ('Dummy Task', "test1: regular expression regex('.*)') is malformed\n[re.error: (unbalanced parenthesis at position 2)]"))
+                            e.args == ('Dummy Task', "test1: regular expression regex('.*)') is malformed\n[re.error: (unbalanced parenthesis at position 2)]") or
+                            e.args == ('Dummy Task', "test1: regular expression regex('.*)') is malformed\n[re.PatternError: (unbalanced parenthesis at position 2)]"))
 
         # bad number of items regex
         self.assertRaises(Exception, compile_regex, "Dummy Task",