Mercurial > cpython-lru_cache-weakref
view Lib/test/test_future.py @ 19283:b865cd5c1925 legacy-trunk
Added comments before recently added/assigned slots in the type object,
so the backward compatibility issues will be easier to understand. I only
added comments indicating additions and assignments back to Python 2.0.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Wed, 15 Aug 2001 18:32:33 +0000 |
| parents | d06bbb8c493a |
| children | 7e5e974b3d37 |
line wrap: on
line source
# Test various flavors of legal and illegal future statements from test_support import unload import re rx = re.compile('\((\S+).py, line (\d+)') def check_error_location(msg): mo = rx.search(msg) print "SyntaxError %s %s" % mo.group(1, 2) # The first two tests should work unload('test_future1') import test_future1 unload('test_future2') import test_future2 # The remaining tests should fail try: import badsyntax_future3 except SyntaxError, msg: check_error_location(str(msg)) try: import badsyntax_future4 except SyntaxError, msg: check_error_location(str(msg)) try: import badsyntax_future5 except SyntaxError, msg: check_error_location(str(msg)) try: import badsyntax_future6 except SyntaxError, msg: check_error_location(str(msg)) try: import badsyntax_future7 except SyntaxError, msg: check_error_location(str(msg))
