tests package¶
Module contents¶
- class portalocker_tests.tests.LockResult(exception_class: Union[Type[Exception], NoneType] = None, exception_message: Union[str, NoneType] = None, exception_repr: Union[str, NoneType] = None)[source]¶
Bases:
object
- __annotations__ = {'exception_class': typing.Union[typing.Type[Exception], NoneType], 'exception_message': typing.Union[str, NoneType], 'exception_repr': typing.Union[str, NoneType]}¶
- __dataclass_fields__ = {'exception_class': Field(name='exception_class',type=typing.Union[typing.Type[Exception], NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=_FIELD), 'exception_message': Field(name='exception_message',type=typing.Union[str, NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=_FIELD), 'exception_repr': Field(name='exception_repr',type=typing.Union[str, NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=True,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'portalocker_tests.tests', '__annotations__': {'exception_class': typing.Union[typing.Type[Exception], NoneType], 'exception_message': typing.Union[str, NoneType], 'exception_repr': typing.Union[str, NoneType]}, 'exception_class': None, 'exception_message': None, 'exception_repr': None, '__dict__': <attribute '__dict__' of 'LockResult' objects>, '__weakref__': <attribute '__weakref__' of 'LockResult' objects>, '__doc__': 'LockResult(exception_class: Union[Type[Exception], NoneType] = None, exception_message: Union[str, NoneType] = None, exception_repr: Union[str, NoneType] = None)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=True,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'exception_class': Field(name='exception_class',type=typing.Union[typing.Type[Exception], NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=_FIELD), 'exception_message': Field(name='exception_message',type=typing.Union[str, NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=_FIELD), 'exception_repr': Field(name='exception_repr',type=typing.Union[str, NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=_FIELD)}, '__init__': <function __create_fn__.<locals>.__init__>, '__repr__': <function __create_fn__.<locals>.__repr__>, '__eq__': <function __create_fn__.<locals>.__eq__>, '__lt__': <function __create_fn__.<locals>.__lt__>, '__le__': <function __create_fn__.<locals>.__le__>, '__gt__': <function __create_fn__.<locals>.__gt__>, '__ge__': <function __create_fn__.<locals>.__ge__>, '__hash__': None})¶
- __eq__(other)¶
Return self==value.
- __ge__(other)¶
Return self>=value.
- __gt__(other)¶
Return self>value.
- __hash__ = None¶
- __init__(exception_class: Optional[Type[Exception]] = None, exception_message: Optional[str] = None, exception_repr: Optional[str] = None) None ¶
- __le__(other)¶
Return self<=value.
- __lt__(other)¶
Return self<value.
- __module__ = 'portalocker_tests.tests'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object (if defined)
- portalocker_tests.tests.lock(filename: str, fail_when_locked: bool, flags: LockFlags) LockResult [source]¶