From 41db504c00ded46674cdc6ffe6ed27f645e47d3b Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 2 Nov 2025 10:28:51 +0000 Subject: [PATCH 1/2] Commit --- test_iconv.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_iconv.py b/test_iconv.py index c6b9de1..9950d4c 100644 --- a/test_iconv.py +++ b/test_iconv.py @@ -12,3 +12,9 @@ def test_with_length(self): s = iconv.open("utf-16le", "utf-8") r = s.iconv(b"Hallo", 11) self.assertEqual(r, "Hallo".encode("utf-16le")) + + def test_incorrect_input_type(self): + s = iconv.open("latin1", "utf-8") + with self.assertRaisesRegex(TypeError, + "iconv expects byte object as first argument"): + r = s.iconv("Hallo") \ No newline at end of file From db678645c7abca4c1e7556f9a860bc77187b3a68 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 2 Nov 2025 10:29:28 +0000 Subject: [PATCH 2/2] pre-commit --- test_iconv.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test_iconv.py b/test_iconv.py index 9950d4c..87f6224 100644 --- a/test_iconv.py +++ b/test_iconv.py @@ -15,6 +15,7 @@ def test_with_length(self): def test_incorrect_input_type(self): s = iconv.open("latin1", "utf-8") - with self.assertRaisesRegex(TypeError, - "iconv expects byte object as first argument"): - r = s.iconv("Hallo") \ No newline at end of file + with self.assertRaisesRegex( + TypeError, "iconv expects byte object as first argument" + ): + r = s.iconv("Hallo")