• Home
  • Raw
  • Download

Lines Matching refs:assertIs

113                 self.assertIs(a&b, bool(int(a)&int(b)))
114 self.assertIs(a|b, bool(int(a)|int(b)))
115 self.assertIs(a^b, bool(int(a)^int(b)))
129 self.assertIs(1==1, True)
130 self.assertIs(1==0, False)
131 self.assertIs(0<1, True)
132 self.assertIs(1<0, False)
133 self.assertIs(0<=0, True)
134 self.assertIs(1<=0, False)
135 self.assertIs(1>0, True)
136 self.assertIs(1>1, False)
137 self.assertIs(1>=1, True)
138 self.assertIs(0>=1, False)
139 self.assertIs(0!=1, True)
140 self.assertIs(0!=0, False)
143 self.assertIs(x is x, True)
144 self.assertIs(x is not x, False)
146 self.assertIs(1 in x, True)
147 self.assertIs(0 in x, False)
148 self.assertIs(1 not in x, False)
149 self.assertIs(0 not in x, True)
152 self.assertIs(x is x, True)
153 self.assertIs(x is not x, False)
155 self.assertIs(1 in x, True)
156 self.assertIs(0 in x, False)
157 self.assertIs(1 not in x, False)
158 self.assertIs(0 not in x, True)
160 self.assertIs(not True, False)
161 self.assertIs(not False, True)
165 self.assertIs(bool(10), True)
166 self.assertIs(bool(1), True)
167 self.assertIs(bool(-1), True)
168 self.assertIs(bool(0), False)
169 self.assertIs(bool("hello"), True)
170 self.assertIs(bool(""), False)
171 self.assertIs(bool(), False)
184 self.assertIs(hasattr([], "append"), True)
185 self.assertIs(hasattr([], "wobble"), False)
188 self.assertIs(callable(len), True)
189 self.assertIs(callable(1), False)
192 self.assertIs(isinstance(True, bool), True)
193 self.assertIs(isinstance(False, bool), True)
194 self.assertIs(isinstance(True, int), True)
195 self.assertIs(isinstance(False, int), True)
196 self.assertIs(isinstance(1, bool), False)
197 self.assertIs(isinstance(0, bool), False)
200 self.assertIs(issubclass(bool, int), True)
201 self.assertIs(issubclass(int, bool), False)
204 self.assertIs(1 in {}, False)
205 self.assertIs(1 in {1:1}, True)
208 self.assertIs("xyz".endswith("z"), True)
209 self.assertIs("xyz".endswith("x"), False)
210 self.assertIs("xyz0123".isalnum(), True)
211 self.assertIs("@#$%".isalnum(), False)
212 self.assertIs("xyz".isalpha(), True)
213 self.assertIs("@#$%".isalpha(), False)
214 self.assertIs("0123".isdigit(), True)
215 self.assertIs("xyz".isdigit(), False)
216 self.assertIs("xyz".islower(), True)
217 self.assertIs("XYZ".islower(), False)
218 self.assertIs("0123".isdecimal(), True)
219 self.assertIs("xyz".isdecimal(), False)
220 self.assertIs("0123".isnumeric(), True)
221 self.assertIs("xyz".isnumeric(), False)
222 self.assertIs(" ".isspace(), True)
223 self.assertIs("\xa0".isspace(), True)
224 self.assertIs("\u3000".isspace(), True)
225 self.assertIs("XYZ".isspace(), False)
226 self.assertIs("X".istitle(), True)
227 self.assertIs("x".istitle(), False)
228 self.assertIs("XYZ".isupper(), True)
229 self.assertIs("xyz".isupper(), False)
230 self.assertIs("xyz".startswith("x"), True)
231 self.assertIs("xyz".startswith("z"), False)
236 self.assertIs(True & True, True)
240 self.assertIs(True | True, True)
244 self.assertIs(True ^ True, False)
249 self.assertIs(f.closed, False)
251 self.assertIs(f.closed, True)
259 self.assertIs(bool(t), True)
263 self.assertIs(operator.truth(0), False)
264 self.assertIs(operator.truth(1), True)
265 self.assertIs(operator.not_(1), False)
266 self.assertIs(operator.not_(0), True)
267 self.assertIs(operator.contains([], 1), False)
268 self.assertIs(operator.contains([1], 1), True)
269 self.assertIs(operator.lt(0, 0), False)
270 self.assertIs(operator.lt(0, 1), True)
271 self.assertIs(operator.is_(True, True), True)
272 self.assertIs(operator.is_(True, False), False)
273 self.assertIs(operator.is_not(True, True), False)
274 self.assertIs(operator.is_not(True, False), True)
278 self.assertIs(marshal.loads(marshal.dumps(True)), True)
279 self.assertIs(marshal.loads(marshal.dumps(False)), False)
284 self.assertIs(pickle.loads(pickle.dumps(True, proto)), True)
285 self.assertIs(pickle.loads(pickle.dumps(False, proto)), False)
329 self.assertIs(bool.from_bytes(b'\x00'*8, 'big'), False)
330 self.assertIs(bool.from_bytes(b'abcd', 'little'), True)
361 self.assertIs(type(True.real), int)
362 self.assertIs(type(True.imag), int)
365 self.assertIs(type(False.real), int)
366 self.assertIs(type(False.imag), int)