Mercurial > cpython-lru_cache-weakref
view Lib/test/test_flufl.py @ 78069:a8aa77458e12 3.2
Add c_size_t and c_ssize_t to the ctypes summary table.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Thu, 12 Jul 2012 20:31:50 +0200 |
| parents | 0530aadff696 |
| children |
line wrap: on
line source
import __future__ import unittest class FLUFLTests(unittest.TestCase): def test_barry_as_bdfl(self): code = "from __future__ import barry_as_FLUFL; 2 {0} 3" compile(code.format('<>'), '<BDFL test>', 'exec', __future__.CO_FUTURE_BARRY_AS_BDFL) self.assertRaises(SyntaxError, compile, code.format('!='), '<FLUFL test>', 'exec', __future__.CO_FUTURE_BARRY_AS_BDFL) def test_guido_as_bdfl(self): code = '2 {0} 3' compile(code.format('!='), '<BDFL test>', 'exec') self.assertRaises(SyntaxError, compile, code.format('<>'), '<FLUFL test>', 'exec') def test_main(): from test.support import run_unittest run_unittest(FLUFLTests) if __name__ == '__main__': test_main()
