Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions returns/contrib/pytest/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

@final
class _ReturnsAsserts(object):
"""Class with helpers assertions to check containers."""

__slots__ = ()

def is_error_handled(self, container) -> bool:
"""Ensures that container has its error handled in the end."""
return getattr(container, _ERROR_FIELD, False)
Expand Down Expand Up @@ -52,7 +56,12 @@ def _patch_error_handling(methods, patch_handler) -> None:
setattr(container, method, patch_handler(original))


@final
class _PatchedContainer(object):
"""Class with helper methods to patched containers."""

__slots__ = ()

@classmethod
def containers_to_patch(cls) -> tuple:
"""We need this method so coverage will work correctly."""
Expand Down