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

Fix bay occupancy #59

Merged
merged 1 commit into from
Oct 9, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyap/source_US/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str:
"Avenue",
"Avn",
"Avnue",
"Bay",
"Bay(?!\ [1-9])",
"Bayoo",
"Bayou",
"Bch",
Expand Down
12 changes: 12 additions & 0 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@ def test_combine_results():
"postal_code": "77030-3411",
},
),
(
"2817 PETERS ROAD BAY 52, Amazeville, AL 12345",
{
"street_number": "2817",
"street_type": "ROAD",
"street_name": "PETERS",
"occupancy": "BAY 52",
"city": "Amazeville",
"region1": "AL",
"postal_code": "12345",
},
),
],
)
def test_parse_address(input: str, expected):
Expand Down
1 change: 1 addition & 0 deletions tests/test_parser_us.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def test_po_box_positive(input, expected):
("P.O. BOX 41256, One Velvet Drive", True),
("666 Hell ST PMB 29700", True),
("817 S.E. 55TH", True),
("2817 PETERS ROAD BAY 52", True),
# negative assertions
(", 666 Hell ST PMB 29700", False),
],
Expand Down
Loading