Skip to content

Commit 3cd6b74

Browse files
serhiy-storchakazvynclaude
authored
gh-66335: Test uppercase IMAP4 command names (GH-152876)
Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fe9c721 commit 3cd6b74

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
@@ -1740,6 +1740,16 @@ def test_xatom(self):
17401740
self.assertEqual(data, [b'MYCOMMAND completed'])
17411741
self.assertEqual(server.args, ['arg1', 'arg2'])
17421742

1743+
def test_uppercase_command_names(self):
1744+
client, server = self._setup(SimpleIMAPHandler)
1745+
client.login('user', 'pass')
1746+
self.assertEqual(client.CAPABILITY, client.capability)
1747+
self.assertEqual(client.SELECT, client.select)
1748+
typ, data = client.CAPABILITY()
1749+
self.assertEqual(typ, 'OK')
1750+
with self.assertRaises(AttributeError):
1751+
client.NONEXISTENT
1752+
17431753
def test_control_characters(self):
17441754
client, _ = self._setup(SimpleIMAPHandler)
17451755
for c0 in support.control_characters_c0():

0 commit comments

Comments
 (0)