%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/hamcrest/core/helpers/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/hamcrest/core/helpers/ismock.py

from typing import Any, List, Type

MOCKTYPES = []  # type: List[Type]
try:
    from mock import Mock

    MOCKTYPES += [Mock]
except ImportError:
    pass
try:
    from unittest.mock import Mock

    MOCKTYPES += [Mock]
except ImportError:
    pass


def ismock(obj: Any) -> bool:
    return isinstance(obj, tuple(MOCKTYPES))

Zerion Mini Shell 1.0