Skip to content

Commit 6416d86

Browse files
miss-islingtonserhiy-storchakazvynclaude
authored
[3.15] gh-66335: Test uppercase IMAP4 command names (GH-152876) (GH-153080)
(cherry picked from commit 3cd6b74) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f8d7ae8 commit 6416d86

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lib/test/test_imaplib.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,16 @@ def test_xatom(self):
17251725
self.assertEqual(data, [b'MYCOMMAND completed'])
17261726
self.assertEqual(server.args, ['arg1', 'arg2'])
17271727

1728+
def test_uppercase_command_names(self):
1729+
client, server = self._setup(SimpleIMAPHandler)
1730+
client.login('user', 'pass')
1731+
self.assertEqual(client.CAPABILITY, client.capability)
1732+
self.assertEqual(client.SELECT, client.select)
1733+
typ, data = client.CAPABILITY()
1734+
self.assertEqual(typ, 'OK')
1735+
with self.assertRaises(AttributeError):
1736+
client.NONEXISTENT
1737+
17281738
def test_control_characters(self):
17291739
client, _ = self._setup(SimpleIMAPHandler)
17301740
for c0 in support.control_characters_c0():

0 commit comments

Comments
 (0)