• Home
  • Raw
  • Download

Lines Matching refs:assertIs

112                 self.assertIs(a&b, bool(int(a)&int(b)))
113 self.assertIs(a|b, bool(int(a)|int(b)))
114 self.assertIs(a^b, bool(int(a)^int(b)))
128 self.assertIs(1==1, True)
129 self.assertIs(1==0, False)
130 self.assertIs(0<1, True)
131 self.assertIs(1<0, False)
132 self.assertIs(0<=0, True)
133 self.assertIs(1<=0, False)
134 self.assertIs(1>0, True)
135 self.assertIs(1>1, False)
136 self.assertIs(1>=1, True)
137 self.assertIs(0>=1, False)
138 self.assertIs(0!=1, True)
139 self.assertIs(0!=0, False)
142 self.assertIs(x is x, True)
143 self.assertIs(x is not x, False)
145 self.assertIs(1 in x, True)
146 self.assertIs(0 in x, False)
147 self.assertIs(1 not in x, False)
148 self.assertIs(0 not in x, True)
151 self.assertIs(x is x, True)
152 self.assertIs(x is not x, False)
154 self.assertIs(1 in x, True)
155 self.assertIs(0 in x, False)
156 self.assertIs(1 not in x, False)
157 self.assertIs(0 not in x, True)
159 self.assertIs(not True, False)
160 self.assertIs(not False, True)
164 self.assertIs(bool(10), True)
165 self.assertIs(bool(1), True)
166 self.assertIs(bool(-1), True)
167 self.assertIs(bool(0), False)
168 self.assertIs(bool("hello"), True)
169 self.assertIs(bool(""), False)
170 self.assertIs(bool(), False)
179 self.assertIs(hasattr([], "append"), True)
180 self.assertIs(hasattr([], "wobble"), False)
183 self.assertIs(callable(len), True)
184 self.assertIs(callable(1), False)
187 self.assertIs(isinstance(True, bool), True)
188 self.assertIs(isinstance(False, bool), True)
189 self.assertIs(isinstance(True, int), True)
190 self.assertIs(isinstance(False, int), True)
191 self.assertIs(isinstance(1, bool), False)
192 self.assertIs(isinstance(0, bool), False)
195 self.assertIs(issubclass(bool, int), True)
196 self.assertIs(issubclass(int, bool), False)
199 self.assertIs(1 in {}, False)
200 self.assertIs(1 in {1:1}, True)
202 self.assertIs({}.has_key(1), False)
203 self.assertIs({1:1}.has_key(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(" ".isspace(), True)
217 self.assertIs("XYZ".isspace(), False)
218 self.assertIs("X".istitle(), True)
219 self.assertIs("x".istitle(), False)
220 self.assertIs("XYZ".isupper(), True)
221 self.assertIs("xyz".isupper(), False)
222 self.assertIs("xyz".startswith("x"), True)
223 self.assertIs("xyz".startswith("z"), False)
226 self.assertIs(unicode("xyz", 'ascii').endswith(unicode("z", 'ascii')), True)
227 self.assertIs(unicode("xyz", 'ascii').endswith(unicode("x", 'ascii')), False)
228 self.assertIs(unicode("xyz0123", 'ascii').isalnum(), True)
229 self.assertIs(unicode("@#$%", 'ascii').isalnum(), False)
230 self.assertIs(unicode("xyz", 'ascii').isalpha(), True)
231 self.assertIs(unicode("@#$%", 'ascii').isalpha(), False)
232 self.assertIs(unicode("0123", 'ascii').isdecimal(), True)
233 self.assertIs(unicode("xyz", 'ascii').isdecimal(), False)
234 self.assertIs(unicode("0123", 'ascii').isdigit(), True)
235 self.assertIs(unicode("xyz", 'ascii').isdigit(), False)
236 self.assertIs(unicode("xyz", 'ascii').islower(), True)
237 self.assertIs(unicode("XYZ", 'ascii').islower(), False)
238 self.assertIs(unicode("0123", 'ascii').isnumeric(), True)
239 self.assertIs(unicode("xyz", 'ascii').isnumeric(), False)
240 self.assertIs(unicode(" ", 'ascii').isspace(), True)
241 self.assertIs(unicode("XYZ", 'ascii').isspace(), False)
242 self.assertIs(unicode("X", 'ascii').istitle(), True)
243 self.assertIs(unicode("x", 'ascii').istitle(), False)
244 self.assertIs(unicode("XYZ", 'ascii').isupper(), True)
245 self.assertIs(unicode("xyz", 'ascii').isupper(), False)
246 self.assertIs(unicode("xyz", 'ascii').startswith(unicode("x", 'ascii')), True)
247 self.assertIs(unicode("xyz", 'ascii').startswith(unicode("z", 'ascii')), False)
252 self.assertIs(True & True, True)
256 self.assertIs(True | True, True)
260 self.assertIs(True ^ True, False)
265 self.assertIs(f.closed, False)
267 self.assertIs(f.closed, True)
275 self.assertIs(bool(t), True)
279 self.assertIs(operator.truth(0), False)
280 self.assertIs(operator.truth(1), True)
282 self.assertIs(operator.isCallable(0), False)
283 self.assertIs(operator.isCallable(len), True)
284 self.assertIs(operator.isNumberType(None), False)
285 self.assertIs(operator.isNumberType(0), True)
286 self.assertIs(operator.not_(1), False)
287 self.assertIs(operator.not_(0), True)
288 self.assertIs(operator.isSequenceType(0), False)
289 self.assertIs(operator.isSequenceType([]), True)
290 self.assertIs(operator.contains([], 1), False)
291 self.assertIs(operator.contains([1], 1), True)
292 self.assertIs(operator.isMappingType(1), False)
293 self.assertIs(operator.isMappingType({}), True)
294 self.assertIs(operator.lt(0, 0), False)
295 self.assertIs(operator.lt(0, 1), True)
296 self.assertIs(operator.is_(True, True), True)
297 self.assertIs(operator.is_(True, False), False)
298 self.assertIs(operator.is_not(True, True), False)
299 self.assertIs(operator.is_not(True, False), True)
303 self.assertIs(marshal.loads(marshal.dumps(True)), True)
304 self.assertIs(marshal.loads(marshal.dumps(False)), False)
309 self.assertIs(pickle.loads(pickle.dumps(True, proto)), True)
310 self.assertIs(pickle.loads(pickle.dumps(False, proto)), False)
315 self.assertIs(cPickle.loads(cPickle.dumps(True, proto)), True)
316 self.assertIs(cPickle.loads(cPickle.dumps(False, proto)), False)
321 self.assertIs(pickle.loads(cPickle.dumps(True, proto)), True)
322 self.assertIs(pickle.loads(cPickle.dumps(False, proto)), False)
323 self.assertIs(cPickle.loads(pickle.dumps(True, proto)), True)
324 self.assertIs(cPickle.loads(pickle.dumps(False, proto)), False)