diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-04-01 05:08:41 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-04-01 05:08:41 (GMT) |
commit | e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d (patch) | |
tree | bfe3d2c8bdb94c077080240cc73717e16dfcd088 /Lib/test/test_flufl.py | |
parent | 4ed72acd68a1a1d90946e189c94b7d656719da45 (diff) | |
download | cpython-e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d.zip cpython-e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d.tar.gz cpython-e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d.tar.bz2 |
The BDFL has retired! Long live the FLUFL (Friendly Language Uncle For Life)!
Diffstat (limited to 'Lib/test/test_flufl.py')
-rw-r--r-- | Lib/test/test_flufl.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Lib/test/test_flufl.py b/Lib/test/test_flufl.py new file mode 100644 index 0000000..5a709bc --- /dev/null +++ b/Lib/test/test_flufl.py @@ -0,0 +1,27 @@ +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() |