Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🌐 add it_IT automotive provider #1634

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions faker/providers/automotive/it_IT/__init__.py
@@ -0,0 +1,15 @@
from .. import Provider as AutomotiveProvider


class Provider(AutomotiveProvider):
"""Implement automotive provider for ``it_IT`` locale.

Sources:

- https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Italy
"""

license_formats = (
# 1994-present
"??###??",
)
6 changes: 6 additions & 0 deletions tests/providers/test_automotive.py
Expand Up @@ -154,6 +154,12 @@ class TestFrFr(_SimpleAutomotiveTestMixin):
license_plate_pattern: Pattern = re.compile(r"\d{3}-[A-Z]{3}-\d{2}|[A-Z]{2}-\d{3}-[A-Z]{2}")


class TestItIt(_SimpleAutomotiveTestMixin):
"""Test it_IT automotive provider methods"""

license_plate_pattern: Pattern = re.compile(r"[A-Z]{2}\d{3}[A-Z]{2}")


class TestNoNo(_SimpleAutomotiveTestMixin):
"""Test no_NO automotive provider methods"""

Expand Down