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])
|