Commits

Bilal Akhtar committed bab76fc

Improve comment above assert line, and remove the Titanic-like verses from the assert statement that made it unsinkable :)

  • Participants
  • Parent commits e8fdcaf

Comments (0)

Files changed (1)

MoinMoin/items/_tests/test_Item.py

             from PIL import Image as PILImage
             result = TransformableBitmapImage._render_data_diff(item1, item.rev, item1.rev)
             # On Werkzeug 0.8.2+, urls with '+' are automatically encoded to '%2B'
-            assert [str(result).startswith('<img src="/+diffraw/image_Item?rev'),
+            # The assert statement works with both older and newer versions of Werkzeug
+            # Probably not an intentional change on the werkzeug side, see issue:
+            # https://github.com/mitsuhiko/werkzeug/issues/146
+            assert True in [str(result).startswith('<img src="/+diffraw/image_Item?rev'),
                     str(result).startswith('<img src="/%2Bdiffraw/image_Item?rev')]
         except ImportError:
             # no PIL