Skip to content

Commit

Permalink
Update test_phone_number.py
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st committed Apr 5, 2024
1 parent 3b9c101 commit f8bee97
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/providers/test_phone_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ class TestSkSk:
"""Test sk_SK phone number provider methods"""

def test_phone_number(self, faker, num_samples):
pattern: Pattern = re.compile(r"(^(00421|\+421)? ?[2-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$)|" \
r"(^(00421|\+421)? ?[2] ?[0-9]{8}$)|" \
r"(^(00421|\+421)? ?[3-5][0-9] ?[0-9]{3} ?[0-9]{4}$)")
pattern: Pattern = re.compile(
r"(^(00421|\+421)? ?[2-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$)|"
r"(^(00421|\+421)? ?[2] ?[0-9]{8}$)|"
r"(^(00421|\+421)? ?[3-5][0-9] ?[0-9]{3} ?[0-9]{4}$)"

Check failure on line 83 in tests/providers/test_phone_number.py

View workflow job for this annotation

GitHub Actions / test_ubuntu (3.9)

AssertionError

Check failure on line 83 in tests/providers/test_phone_number.py

View workflow job for this annotation

GitHub Actions / test_ubuntu (3.11)

AssertionError
)
for _ in range(num_samples):
phone_number = faker.phone_number()
assert pattern.fullmatch(phone_number)
Expand Down

0 comments on commit f8bee97

Please sign in to comment.