bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880)

This fixes also bpo-22091.
This commit is contained in:
Serhiy Storchaka 2017-12-15 12:35:48 +02:00 committed by GitHub
parent 297fd876aa
commit 3325a6780c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 38 deletions

View file

@ -35,6 +35,7 @@ class TestSpecifics(unittest.TestCase):
import builtins
prev = builtins.__debug__
setattr(builtins, '__debug__', 'sure')
self.assertEqual(__debug__, prev)
setattr(builtins, '__debug__', prev)
def test_argument_handling(self):