Skip to content

Commit b5a4633

Browse files
committed
add unit test to check if too long in the extract method as well
1 parent 9e59583 commit b5a4633

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_pydomainextractor.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ def test_syntactic_invalid_domains(
301301
):
302302
self.domain_extractor.extract('com.')
303303

304+
def test_domain_too_long(
305+
self,
306+
):
307+
with self.assertRaises(
308+
expected_exception=ValueError,
309+
):
310+
self.domain_extractor.extract(f'{"very-long" * 255}.com')
311+
304312
def test_extract_from_url(
305313
self,
306314
):

0 commit comments

Comments
 (0)