File: PR17.patch

package info (click to toggle)
cssutils 1.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,632 kB
  • sloc: python: 20,333; sh: 62; makefile: 20
file content (24 lines) | stat: -rw-r--r-- 884 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
24
From 355b1795dde77bd4b49d8df35377230fdb503802 Mon Sep 17 00:00:00 2001
From: Arthur Zamarin <arthurzam@gmail.com>
Date: Fri, 22 Oct 2021 17:48:28 +0300
Subject: [PATCH] Fix expected error message for python 3.10

python 3.10 adds some words to it's errors, so catch if our expected
are contained in the actual output

Signed-off-by: Arthur Zamarin <arthurzam@gmail.com>
---
 cssutils/tests/basetest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/cssutils/tests/basetest.py
+++ b/src/cssutils/tests/basetest.py
@@ -134,7 +134,7 @@ class BaseTestCase(unittest.TestCase):
             if not msg:
                 # No message provided: any message is fine.
                 return
-            elif excMsg == msg:
+            elif msg in excMsg:
                 # Message provided, and we got the right message: passes.
                 return
             else: