• Home
  • Raw
  • Download

Lines Matching refs:assertIs

111                 self.assertIs(a&b, bool(int(a)&int(b)))
112 self.assertIs(a|b, bool(int(a)|int(b)))
113 self.assertIs(a^b, bool(int(a)^int(b)))
127 self.assertIs(1==1, True)
128 self.assertIs(1==0, False)
129 self.assertIs(0<1, True)
130 self.assertIs(1<0, False)
131 self.assertIs(0<=0, True)
132 self.assertIs(1<=0, False)
133 self.assertIs(1>0, True)
134 self.assertIs(1>1, False)
135 self.assertIs(1>=1, True)
136 self.assertIs(0>=1, False)
137 self.assertIs(0!=1, True)
138 self.assertIs(0!=0, False)
141 self.assertIs(x is x, True)
142 self.assertIs(x is not x, False)
144 self.assertIs(1 in x, True)
145 self.assertIs(0 in x, False)
146 self.assertIs(1 not in x, False)
147 self.assertIs(0 not in x, True)
150 self.assertIs(x is x, True)
151 self.assertIs(x is not x, False)
153 self.assertIs(1 in x, True)
154 self.assertIs(0 in x, False)
155 self.assertIs(1 not in x, False)
156 self.assertIs(0 not in x, True)
158 self.assertIs(not True, False)
159 self.assertIs(not False, True)
163 self.assertIs(bool(10), True)
164 self.assertIs(bool(1), True)
165 self.assertIs(bool(-1), True)
166 self.assertIs(bool(0), False)
167 self.assertIs(bool("hello"), True)
168 self.assertIs(bool(""), False)
169 self.assertIs(bool(), False)
182 self.assertIs(hasattr([], "append"), True)
183 self.assertIs(hasattr([], "wobble"), False)
186 self.assertIs(callable(len), True)
187 self.assertIs(callable(1), False)
190 self.assertIs(isinstance(True, bool), True)
191 self.assertIs(isinstance(False, bool), True)
192 self.assertIs(isinstance(True, int), True)
193 self.assertIs(isinstance(False, int), True)
194 self.assertIs(isinstance(1, bool), False)
195 self.assertIs(isinstance(0, bool), False)
198 self.assertIs(issubclass(bool, int), True)
199 self.assertIs(issubclass(int, bool), False)
202 self.assertIs(1 in {}, False)
203 self.assertIs(1 in {1:1}, True)
206 self.assertIs("xyz".endswith("z"), True)
207 self.assertIs("xyz".endswith("x"), False)
208 self.assertIs("xyz0123".isalnum(), True)
209 self.assertIs("@#$%".isalnum(), False)
210 self.assertIs("xyz".isalpha(), True)
211 self.assertIs("@#$%".isalpha(), False)
212 self.assertIs("0123".isdigit(), True)
213 self.assertIs("xyz".isdigit(), False)
214 self.assertIs("xyz".islower(), True)
215 self.assertIs("XYZ".islower(), False)
216 self.assertIs("0123".isdecimal(), True)
217 self.assertIs("xyz".isdecimal(), False)
218 self.assertIs("0123".isnumeric(), True)
219 self.assertIs("xyz".isnumeric(), False)
220 self.assertIs(" ".isspace(), True)
221 self.assertIs("\xa0".isspace(), True)
222 self.assertIs("\u3000".isspace(), True)
223 self.assertIs("XYZ".isspace(), False)
224 self.assertIs("X".istitle(), True)
225 self.assertIs("x".istitle(), False)
226 self.assertIs("XYZ".isupper(), True)
227 self.assertIs("xyz".isupper(), False)
228 self.assertIs("xyz".startswith("x"), True)
229 self.assertIs("xyz".startswith("z"), False)
234 self.assertIs(True & True, True)
238 self.assertIs(True | True, True)
242 self.assertIs(True ^ True, False)
247 self.assertIs(f.closed, False)
248 self.assertIs(f.closed, True)
256 self.assertIs(bool(t), True)
260 self.assertIs(operator.truth(0), False)
261 self.assertIs(operator.truth(1), True)
262 self.assertIs(operator.not_(1), False)
263 self.assertIs(operator.not_(0), True)
264 self.assertIs(operator.contains([], 1), False)
265 self.assertIs(operator.contains([1], 1), True)
266 self.assertIs(operator.lt(0, 0), False)
267 self.assertIs(operator.lt(0, 1), True)
268 self.assertIs(operator.is_(True, True), True)
269 self.assertIs(operator.is_(True, False), False)
270 self.assertIs(operator.is_not(True, True), False)
271 self.assertIs(operator.is_not(True, False), True)
275 self.assertIs(marshal.loads(marshal.dumps(True)), True)
276 self.assertIs(marshal.loads(marshal.dumps(False)), False)
281 self.assertIs(pickle.loads(pickle.dumps(True, proto)), True)
282 self.assertIs(pickle.loads(pickle.dumps(False, proto)), False)
326 self.assertIs(bool.from_bytes(b'\x00'*8, 'big'), False)
327 self.assertIs(bool.from_bytes(b'abcd', 'little'), True)
358 self.assertIs(type(True.real), int)
359 self.assertIs(type(True.imag), int)
362 self.assertIs(type(False.real), int)
363 self.assertIs(type(False.imag), int)