]> git.pld-linux.org Git - packages/python-cliff.git/blobdiff - python-cliff-py2-test.patch
- updated to 2.18.0 with some backported fixes
[packages/python-cliff.git] / python-cliff-py2-test.patch
diff --git a/python-cliff-py2-test.patch b/python-cliff-py2-test.patch
new file mode 100644 (file)
index 0000000..993ea6d
--- /dev/null
@@ -0,0 +1,23 @@
+It fails now - something changed in codecs or six?
+There is no fix to backport because cliff>=3 dropped py2 support
+--- cliff-2.18.0/cliff/tests/test_app.py.orig  2024-01-16 20:52:28.136254060 +0100
++++ cliff-2.18.0/cliff/tests/test_app.py       2024-01-16 20:58:52.597504588 +0100
+@@ -525,18 +525,6 @@ class TestIO(base.TestBase):
+         text_utf8 = text.encode('utf-8')
+         if six.PY2:
+-            # In PY2 StreamWriter can't accept non-ASCII encoded characters
+-            # because it must first promote the encoded byte stream to
+-            # unicode in order to encode it in the desired encoding.
+-            # Because the encoding of the byte stream is not known at this
+-            # point the default-encoding of ASCII is utilized, but you can't
+-            # decode a non-ASCII charcater to ASCII.
+-            io = six.StringIO()
+-            writer = codecs.getwriter('utf-8')(io)
+-            self.assertRaises(UnicodeDecodeError,
+-                              writer.write,
+-                              text_utf8)
+-
+             # In PY2 with our override of codecs.getwriter we do not
+             # attempt to encode bytes in a str object (only unicode
+             # objects) therefore the final output string should be the
This page took 0.155777 seconds and 4 git commands to generate.