From 212861f8eed372d47a5cf583c8f9bca9c07a8ce0 Mon Sep 17 00:00:00 2001 From: git-staus <215707233+git-staus@users.noreply.github.com> Date: Tue, 3 Mar 2026 16:22:20 +0100 Subject: [PATCH 1/3] Add a failing test for accented capitals --- tests/test_transcriptions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_transcriptions.py b/tests/test_transcriptions.py index bdeb444..1a2a76a 100644 --- a/tests/test_transcriptions.py +++ b/tests/test_transcriptions.py @@ -63,6 +63,8 @@ class TestConvertFunctions(unittest.TestCase): accented_pinyin_spaced = "Wǒ shì yī gè měi guó rén." zhuyin = "ㄨㄛˇ ㄕˋ ㄧ ㄍㄜˋ ㄇㄟˇ ㄍㄨㄛˊ ㄖㄣˊ." ipa = "wɔ˧˩˧ ʂɨ˥˩ i˥ kɤ˥˩ meɪ˧˩˧ kwɔ˧˥ ʐən˧˥." + uppercase_accented_pinyin = "Ài Àn Ào Ái È Èr É Ér Ā Āi Ēn Ō Ōu" + uppercase_accented_zhuyin = "ㄞˋ ㄢˋ ㄠˋ ㄞˊ ㄜˋ ㄦˋ ㄜˊ ㄦˊ ㄚ ㄞ ㄣ ㄛ ㄡ" def test_numbered_to_accented(self): accented_pinyin = trans.to_pinyin(self.numbered_pinyin) @@ -193,3 +195,7 @@ def test_issue_27(self): zhuyin = "ㄊㄟ" self.assertEqual(zhuyin, trans.pinyin_to_zhuyin(pinyin)) + + def test_uppercase_accented_pinyin_to_zhuyin(self): + zhuyin = trans.pinyin_to_zhuyin(self.uppercase_accented_pinyin) + self.assertEqual(zhuyin, self.uppercase_accented_zhuyin) From 12d843ff1bd7d6930e38a1ea8511e6eaf65404a3 Mon Sep 17 00:00:00 2001 From: git-staus <215707233+git-staus@users.noreply.github.com> Date: Tue, 3 Mar 2026 16:25:28 +0100 Subject: [PATCH 2/3] Add a failing test for Pinyin V --- tests/test_transcriptions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_transcriptions.py b/tests/test_transcriptions.py index 1a2a76a..c38f4b0 100644 --- a/tests/test_transcriptions.py +++ b/tests/test_transcriptions.py @@ -199,3 +199,6 @@ def test_issue_27(self): def test_uppercase_accented_pinyin_to_zhuyin(self): zhuyin = trans.pinyin_to_zhuyin(self.uppercase_accented_pinyin) self.assertEqual(zhuyin, self.uppercase_accented_zhuyin) + + def test_pinying_v_to_zhuyin(self): + self.assertEqual(trans.pinyin_to_zhuyin("lvè"), "ㄌㄩㄝˋ") From 6fc24f8a68ee54b50daf3ba2ce41783b6f448cc0 Mon Sep 17 00:00:00 2001 From: git-staus <215707233+git-staus@users.noreply.github.com> Date: Tue, 3 Mar 2026 16:26:57 +0100 Subject: [PATCH 3/3] Add passing variants of the failing tests --- tests/test_transcriptions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_transcriptions.py b/tests/test_transcriptions.py index c38f4b0..0058f51 100644 --- a/tests/test_transcriptions.py +++ b/tests/test_transcriptions.py @@ -202,3 +202,10 @@ def test_uppercase_accented_pinyin_to_zhuyin(self): def test_pinying_v_to_zhuyin(self): self.assertEqual(trans.pinyin_to_zhuyin("lvè"), "ㄌㄩㄝˋ") + + def test_lowercase_accented_pinyin_to_zhuyin(self): + zhuyin = trans.pinyin_to_zhuyin(self.uppercase_accented_pinyin.lower()) + self.assertEqual(zhuyin, self.uppercase_accented_zhuyin) + + def test_pinying_u_with_diaeresis_to_zhuyin(self): + self.assertEqual(trans.pinyin_to_zhuyin("lüè"), "ㄌㄩㄝˋ")