Sha256: ff9d0ccbaec06dc1efc9ccfc580a069daff3f40ef6073beae4badbabd379a764

Contents?: true

Size: 927 Bytes

Versions: 30

Compression:

Stored size: 927 Bytes

Contents

# 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

unload('test_future3')
import test_future3

# 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))

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rubyfox-server-2.19.2.0 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/test_future.py
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/test_future.py