[New-bugs-announce] [issue12928] exec not woking in unittest

simon report at bugs.python.org
Wed Sep 7 15:16:26 CEST 2011


New submission from simon <ext-simon.steiner at nokia.com>:

works in 2.6, fails in 3.2.2

import unittest
class MyTest(unittest.TestCase):
    def test_a(self):
        exec(compile("a = 1", '', 'single'))
        assert a == 1
if __name__ == '__main__':
    unittest.main()

----------
components: Library (Lib)
messages: 143672
nosy: simonsteiner
priority: normal
severity: normal
status: open
title: exec not woking in unittest
type: compile error
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12928>
_______________________________________


More information about the New-bugs-announce mailing list