diff options
Diffstat (limited to 'debian/patches/skip_test_decode_error_handling.patch')
-rw-r--r-- | debian/patches/skip_test_decode_error_handling.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/skip_test_decode_error_handling.patch b/debian/patches/skip_test_decode_error_handling.patch new file mode 100644 index 0000000..84d1409 --- /dev/null +++ b/debian/patches/skip_test_decode_error_handling.patch @@ -0,0 +1,29 @@ +Description: skip failing test test_decode_error_handling fails with python3 when preferred encoding is ascii +Author: Ben Carrillo <ben@futeisha.org> +Bug: https://github.com/amoffat/sh/issues/124 +Forwarded: yes +--- a/test.py ++++ b/test.py +@@ -1329,22 +1329,6 @@ + p = ls(_no_pipe=True) + self.assertTrue(p.process._pipe_queue.empty()) + +- +- def test_decode_error_handling(self): +- from functools import partial +- +- py = create_tmp_test(""" +-# -*- coding: utf8 -*- +-import sys +-sys.stdout.write("te漢字st") +-""") +- #fn = partial(python, py.name, _encoding="ascii") +- #def s(fn): str(fn()) +- #self.assertRaises(UnicodeDecodeError, s, fn) +- +- p = python(py.name, _encoding="ascii", _decode_errors="ignore") +- self.assertEqual(p, "test") +- + + def test_shared_secial_args(self): + import sh |