Skip to content

Commit

Permalink
Fix bay occupancy
Browse files Browse the repository at this point in the history
  • Loading branch information
lmelninkas committed Oct 9, 2024
1 parent c159b0f commit 3c4c03f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
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

0 comments on commit 3c4c03f

Please sign in to comment.