• Home
  • Raw
  • Download

Lines Matching refs:False

22         self.assertEqual(repr(False), 'False')
24 self.assertIs(eval(repr(False)), False)
28 self.assertEqual(str(False), 'False')
32 self.assertEqual(int(False), 0)
33 self.assertIsNot(int(False), False)
38 self.assertEqual(float(False), 0.0)
39 self.assertIsNot(float(False), False)
44 self.assertEqual(+False, 0)
45 self.assertIsNot(+False, False)
46 self.assertEqual(-False, 0)
47 self.assertIsNot(-False, False)
48 self.assertEqual(abs(False), 0)
49 self.assertIsNot(abs(False), False)
55 self.assertEqual(~False, -1)
58 self.assertEqual(False+2, 2)
60 self.assertEqual(2+False, 2)
63 self.assertEqual(False+False, 0)
64 self.assertIsNot(False+False, False)
65 self.assertEqual(False+True, 1)
66 self.assertIsNot(False+True, True)
67 self.assertEqual(True+False, 1)
68 self.assertIsNot(True+False, True)
72 self.assertIsNot(True-True, False)
73 self.assertEqual(False-False, 0)
74 self.assertIsNot(False-False, False)
75 self.assertEqual(True-False, 1)
76 self.assertIsNot(True-False, True)
77 self.assertEqual(False-True, -1)
80 self.assertEqual(False*1, 0)
81 self.assertIsNot(False*1, False)
85 self.assertEqual(False/1, 0)
86 self.assertIsNot(False/1, False)
89 self.assertIsNot(True%1, False)
92 self.assertEqual(False%1, 0)
93 self.assertIsNot(False%1, False)
95 for b in False, True:
100 for a in False, True:
101 for b in False, True:
119 self.assertIs(1==0, False)
121 self.assertIs(1<0, False)
123 self.assertIs(1<=0, False)
125 self.assertIs(1>1, False)
127 self.assertIs(0>=1, False)
129 self.assertIs(0!=0, False)
133 self.assertIs(x is not x, False)
136 self.assertIs(0 in x, False)
137 self.assertIs(1 not in x, False)
142 self.assertIs(x is not x, False)
145 self.assertIs(0 in x, False)
146 self.assertIs(1 not in x, False)
149 self.assertIs(not True, False)
150 self.assertIs(not False, True)
157 self.assertIs(bool(0), False)
159 self.assertIs(bool(""), False)
160 self.assertIs(bool(), False)
167 self.assertEqual("%d" % False, "0")
169 self.assertEqual("%x" % False, "0")
174 self.assertIs(hasattr([], "wobble"), False)
178 self.assertIs(callable(1), False)
182 self.assertIs(isinstance(False, bool), True)
184 self.assertIs(isinstance(False, int), True)
185 self.assertIs(isinstance(1, bool), False)
186 self.assertIs(isinstance(0, bool), False)
190 self.assertIs(issubclass(int, bool), False)
193 self.assertIs(1 in {}, False)
198 self.assertIs("xyz".endswith("x"), False)
200 self.assertIs("@#$%".isalnum(), False)
202 self.assertIs("@#$%".isalpha(), False)
204 self.assertIs("xyz".isdigit(), False)
206 self.assertIs("XYZ".islower(), False)
208 self.assertIs("xyz".isdecimal(), False)
210 self.assertIs("xyz".isnumeric(), False)
214 self.assertIs("XYZ".isspace(), False)
216 self.assertIs("x".istitle(), False)
218 self.assertIs("xyz".isupper(), False)
220 self.assertIs("xyz".startswith("z"), False)
233 self.assertIs(True ^ True, False)
238 self.assertIs(f.closed, False)
251 self.assertIs(operator.truth(0), False)
253 self.assertIs(operator.not_(1), False)
255 self.assertIs(operator.contains([], 1), False)
257 self.assertIs(operator.lt(0, 0), False)
260 self.assertIs(operator.is_(True, False), False)
261 self.assertIs(operator.is_not(True, True), False)
262 self.assertIs(operator.is_not(True, False), True)
267 self.assertIs(marshal.loads(marshal.dumps(False)), False)
273 self.assertIs(pickle.loads(pickle.dumps(False, proto)), False)
279 self.assertEqual(pickle.dumps(False, protocol=0), b"I00\n.")
281 self.assertEqual(pickle.dumps(False, protocol=1), b"I00\n.")
283 self.assertEqual(pickle.dumps(False, protocol=2), b'\x80\x02\x89.')
317 self.assertIs(bool.from_bytes(b'\x00'*8, 'big'), False)
351 self.assertEqual(False.real, 0)
352 self.assertEqual(False.imag, 0)
353 self.assertIs(type(False.real), int)
354 self.assertIs(type(False.imag), int)