Lines Matching refs:self
43 def __init__(self, string):
44 self.string = string
45 self.explanation = []
47 def __str__(self):
48 return self.string
50 def __eq__(self, other):
52 a = [line for line in self.string.strip().splitlines() if not line.startswith("###")]
57 self.explanation = _make_explanation(a, b)
63 def __eq__(self, other):
64 a = _split_and_sort(self.string)
69 self.explanation = _make_explanation(a, b)
74 def __init__(self, capfd):
75 self.capfd = capfd
76 self.out = ""
77 self.err = ""
79 def __enter__(self):
80 self.capfd.readouterr()
81 return self
83 def __exit__(self, *args):
84 self.out, self.err = self.capfd.readouterr()
86 def __eq__(self, other):
87 a = Output(self.out)
92 self.explanation = a.explanation
95 def __str__(self):
96 return self.out
98 def __contains__(self, item):
99 return item in self.out
102 def unordered(self):
103 return Unordered(self.out)
106 def stderr(self):
107 return Output(self.err)
117 def __init__(self, sanitizer):
118 self.sanitizer = sanitizer
119 self.string = ""
120 self.explanation = []
122 def __call__(self, thing):
123 self.string = self.sanitizer(thing)
124 return self
126 def __eq__(self, other):
127 a = self.string
132 self.explanation = _make_explanation(a.splitlines(), b.splitlines())