Move setting of ioready 'wait' earlier in call chain, to
[python/dscho.git] / Lib / test / test_future.py
blob12813d4b446df6cd027b671f7f49447b2dd7ad6a
1 # Test various flavors of legal and illegal future statements
3 from test.test_support import unload
4 import re
6 rx = re.compile('\((\S+).py, line (\d+)')
8 def check_error_location(msg):
9 mo = rx.search(msg)
10 print "SyntaxError %s %s" % mo.group(1, 2)
12 # The first two tests should work
14 unload('test_future1')
15 from test import test_future1
17 unload('test_future2')
18 from test import test_future2
20 unload('test_future3')
21 from test import test_future3
23 # The remaining tests should fail
24 try:
25 from test import badsyntax_future3
26 except SyntaxError, msg:
27 check_error_location(str(msg))
29 try:
30 from test import badsyntax_future4
31 except SyntaxError, msg:
32 check_error_location(str(msg))
34 try:
35 from test import badsyntax_future5
36 except SyntaxError, msg:
37 check_error_location(str(msg))
39 try:
40 from test import badsyntax_future6
41 except SyntaxError, msg:
42 check_error_location(str(msg))
44 try:
45 from test import badsyntax_future7
46 except SyntaxError, msg:
47 check_error_location(str(msg))