Skip to content

Commit c846447

Browse files
committed
Add a positive test for an email address with right-to-left BIDI domain part characters
The domain displays its labels out of order, so it's unclear if this is a usable email address in practice, but it is syntactically valid.
1 parent b21fa57 commit c846447

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎tests/test_syntax.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ def MakeValidatedEmail(**kwargs: Any) -> ValidatedEmail:
167167
display_name='My."Na\\me".Is'
168168
),
169169
),
170+
(
171+
'me@גבריאל.xn--4dbrk0ce.il',
172+
MakeValidatedEmail(
173+
local_part='me',
174+
ascii_local_part='me',
175+
smtputf8=False,
176+
ascii_domain='xn--4dbbc3aq3e.xn--4dbrk0ce.il',
177+
ascii_email='me@xn--4dbbc3aq3e.xn--4dbrk0ce.il',
178+
domain='גבריאל.ישראל.il',
179+
normalized='me@גבריאל.ישראל.il',
180+
),
181+
),
170182
],
171183
)
172184
def test_email_valid(email_input: str, output: ValidatedEmail) -> None:

0 commit comments

Comments
 (0)