Skip to content

Commit 9e59583

Browse files
committed
add url with long domain test to cover the fix
1 parent bdafc79 commit 9e59583

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_pydomainextractor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,11 @@ def test_extract_from_url(
349349
):
350350
self.domain_extractor.extract_from_url('co.uk')
351351

352+
with self.assertRaises(
353+
ValueError,
354+
):
355+
self.domain_extractor.extract_from_url(f'http://{"domain" * 255}co.uk:3030/some/path')
356+
352357
self.assertEqual(
353358
first=self.domain_extractor.extract_from_url('http://www.google.com'),
354359
second={

0 commit comments

Comments
 (0)