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.
1 parent d169b57 commit 3ac9b82Copy full SHA for 3ac9b82
1 file changed
Lib/test/test_bool.py
@@ -65,9 +65,15 @@ def test_math(self):
65
# module loading and not during test execution.
66
false = False
67
self.assertEqual(~false, -1)
68
+ with self.assertWarns(DeprecationWarning):
69
+ # also check that the warning is issued in case of constant
70
+ # folding at compile time
71
+ self.assertEqual(eval("~False"), -1)
72
with self.assertWarns(DeprecationWarning):
73
true = True
74
self.assertEqual(~true, -2)
75
76
+ self.assertEqual(eval("~True"), -2)
77
78
self.assertEqual(False+2, 2)
79
self.assertEqual(True+2, 3)
0 commit comments