Skip to content

Commit

Permalink
test: skip failing test_postal_fingerprint_address on macOS
Browse files Browse the repository at this point in the history
For some reason the mac install of postal doesn't have this symbol?

Also make the error message less confusing, it had e.name as _near_dupe, which is a total red herring for users. Keep it unified.
  • Loading branch information
NickCrews committed Jul 17, 2024
1 parent ac10b6c commit df909cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mismo/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def optional_import(pip_name: str):
yield
except ImportError as e:
raise ImportError(
f"Package `{e.name}` is required for this functionality. "
f"Package `{pip_name}` is required for this functionality. "
f"Please install it separately using `python -m pip install {pip_name}`."
) from e

Expand Down
6 changes: 6 additions & 0 deletions mismo/lib/geo/tests/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ def test_postal_parse_address(address, expected):


@pytest.mark.skipif(sys.platform == "win32", reason="postal not tested for Windows dev")
@pytest.mark.skipif(
sys.platform == "darwin",
# For some reason the mac install of postal doesn't have this symbol?
# dlopen(.../_near_dupe.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_libpostal_near_dupe_name_hashes' # noqa: E501
reason="mac install of postal doesn't have this function",
)
@pytest.mark.parametrize(
"address, expected",
[
Expand Down

0 comments on commit df909cb

Please sign in to comment.