Skip to content

AttributeError if pact installed #120

@jayvdb

Description

@jayvdb

When https://github.com/getslash/pact is installed, pactman breaks with:

  File "/usr/lib/python3.10/site-packages/pactman/mock/matchers.py", line 308, in <module>
    LIKE_CLASSES = (Like, pact_python.Like)
AttributeError: module 'pact' has no attribute 'Like'

The code in question is looking for https://github.com/pact-foundation/pact-python , and only guards for ImportError, when it should also guard against other exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions