| 1 |
Description: Python 3.14: avoid type error |
| 2 |
Author: Thomas Goirand <[email protected]> |
| 3 |
Bug-Debian: https://bugs.debian.org/1123455 |
| 4 |
Forwarded: no |
| 5 |
Last-Update: 2025-12-26 |
| 6 |
|
| 7 |
--- python-sure-2.0.1+git.2023.02.06.3aef950b7c.orig/sure/old.py |
| 8 |
+++ python-sure-2.0.1+git.2023.02.06.3aef950b7c/sure/old.py |
| 9 |
@@ -431,7 +431,12 @@ class AssertionHelper(object): |
| 10 |
return what in items |
| 11 |
|
| 12 |
def contains(self, what): |
| 13 |
|
| 14 |
+ try: |
| 15 |
+ assert what in self._src, '%r should be in %r' % (what, self._src) |
| 16 |
+ except TypeError: |
| 17 |
+ if self._src is None: |
| 18 |
+ raise TypeError("argument of type 'NoneType' is not iterable") |
| 19 |
+ raise |
| 20 |
return True |
| 21 |
|
| 22 |
def does_not_contain(self, what): |