File: 0003-Use-asserts-for-failing-test-so-we-get-better-feedba.patch

package info (click to toggle)
python-mechanize 1%3A0.4.8%2Bpypi-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,612 kB
  • sloc: python: 16,644; makefile: 11
file content (28 lines) | stat: -rw-r--r-- 1,034 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
25
26
27
28
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Tue, 24 May 2022 11:13:16 +0530
Subject: Use asserts for failing test so we get better feedback on the
 failure

---
 test/test_cookies.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/test_cookies.py b/test/test_cookies.py
index cb03060..e699e3e 100644
--- a/test/test_cookies.py
+++ b/test/test_cookies.py
@@ -1028,10 +1028,10 @@ class CookieTests(unittest.TestCase):
             i = 0
             for c in cs:
                 # assert isinstance(c, Cookie)
-                assert c.version == versions[i]
-                assert c.name == names[i]
-                assert c.domain == domains[i]
-                assert c.path == paths[i]
+                self.assertEqual(c.version, versions[i])
+                self.assertEqual(c.name, names[i])
+                self.assertEqual(c.domain, domains[i])
+                self.assertEqual(c.path, paths[i])
                 i = i + 1
 
         self.assertRaises(IndexError, lambda cs=cs: cs[5])