Description: Python 3.14: avoid type error Author: Thomas Goirand Bug-Debian: https://bugs.debian.org/1123455 Forwarded: no Last-Update: 2025-12-26 --- python-sure-2.0.1+git.2023.02.06.3aef950b7c.orig/sure/old.py +++ python-sure-2.0.1+git.2023.02.06.3aef950b7c/sure/old.py @@ -431,7 +431,12 @@ class AssertionHelper(object): return what in items def contains(self, what): - assert what in self._src, '%r should be in %r' % (what, self._src) + try: + assert what in self._src, '%r should be in %r' % (what, self._src) + except TypeError: + if self._src is None: + raise TypeError("argument of type 'NoneType' is not iterable") + raise return True def does_not_contain(self, what):