Selfie
Loading...
Searching...
No Matches
selfie_lib.SelfieImplementations.ReprSelfie Class Reference
Inheritance diagram for selfie_lib.SelfieImplementations.ReprSelfie:
selfie_lib.SelfieImplementations.DiskSelfie selfie_lib.SelfieImplementations.FluentFacet selfie_lib.SelfieImplementations.BinarySelfie selfie_lib.SelfieImplementations.StringSelfie

Public Member Functions

 __init__ (self, T actual_before_repr, Snapshot actual, DiskStorage disk)
T to_be_TODO (self, Optional[T] _=None)
T to_be (self, T expected)
Public Member Functions inherited from selfie_lib.SelfieImplementations.DiskSelfie
 __init__ (self, Snapshot actual, DiskStorage disk)
"DiskSelfie" to_match_disk (self, str sub="")
"DiskSelfie" to_match_disk_TODO (self, str sub="")
"StringFacet" facet (self, str facet)
"StringFacet" facets (self, *str facets)
"BinaryFacet" facet_binary (self, str facet)

Public Attributes

 actual_before_repr = actual_before_repr
Public Attributes inherited from selfie_lib.SelfieImplementations.DiskSelfie
 actual = actual
 disk = disk

Detailed Description

Definition at line 97 of file SelfieImplementations.py.

Constructor & Destructor Documentation

◆ __init__()

selfie_lib.SelfieImplementations.ReprSelfie.__init__ ( self,
T actual_before_repr,
Snapshot actual,
DiskStorage disk )

Definition at line 98 of file SelfieImplementations.py.

98 def __init__(self, actual_before_repr: T, actual: Snapshot, disk: DiskStorage):
99 super().__init__(actual, disk)
100 self.actual_before_repr = actual_before_repr
101

Member Function Documentation

◆ to_be()

T selfie_lib.SelfieImplementations.ReprSelfie.to_be ( self,
T expected )

Reimplemented in selfie_lib.SelfieImplementations.StringSelfie.

Definition at line 105 of file SelfieImplementations.py.

105 def to_be(self, expected: T) -> T:
106 if self.actual_before_repr == expected:
107 return _check_src(self.actual_before_repr)
108 else:
109 return _to_be_didnt_match(expected, self.actual_before_repr, LiteralRepr())
110
111

◆ to_be_TODO()

T selfie_lib.SelfieImplementations.ReprSelfie.to_be_TODO ( self,
Optional[T] _ = None )

Reimplemented in selfie_lib.SelfieImplementations.StringSelfie.

Definition at line 102 of file SelfieImplementations.py.

102 def to_be_TODO(self, _: Optional[T] = None) -> T:
103 return _to_be_didnt_match(None, self.actual_before_repr, LiteralRepr())
104

Member Data Documentation

◆ actual_before_repr

selfie_lib.SelfieImplementations.ReprSelfie.actual_before_repr = actual_before_repr

Definition at line 100 of file SelfieImplementations.py.


The documentation for this class was generated from the following file: