Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5fb195f + 7fe1049 commit 66113bbCopy full SHA for 66113bb
1 file changed
Lib/test/test_long.py
@@ -1235,6 +1235,13 @@ def __new__(cls, value=0):
1235
for n in map(int, integers):
1236
self.assertEqual(n, 0)
1237
1238
+ def test_shift_bool(self):
1239
+ # Issue #21422: ensure that bool << int and bool >> int return int
1240
+ for value in (True, False):
1241
+ for shift in (0, 2):
1242
+ self.assertEqual(type(value << shift), int)
1243
+ self.assertEqual(type(value >> shift), int)
1244
+
1245
1246
def test_main():
1247
support.run_unittest(LongTest)
0 commit comments