Sha256: 980611d8c1bb26c54a870bae2964772a4b9bac544381c0b703fa770921b30dcf

Contents?: true

Size: 1.01 KB

Versions: 30

Compression:

Stored size: 1.01 KB

Contents

import sys
import os
dir = os.path.dirname(sys.argv[0])
scriptsdir = os.path.normpath(os.path.join(dir, os.pardir, 'scripts'))
sys.path.append(scriptsdir)
from test_support import *

def test931():
    '''exec and eval are not thread safe'''

    from java.lang import Thread

    class TestThread(Thread):
	def run(self):
	    for i in range(30):
		exec("x=2+2")

    testers = []
    for i in range(10):
	testers.append(TestThread())

    for tester in testers:
	tester.start()


    for tester in testers:
	tester.join()

code32 = """\
def foo():
    try:
	2+2
    finally:
	return 4
"""

def test32():
    'return in finally clause causes java.lang.VerifyError at compile time'
    exec code32

print_test('Bug Fixes', 0)
print_test('From 1.0.1 to 1.0.2', 1)

items = locals().items()
items.sort()

errors = 0
for name, value in items:
    if name[:4] == 'test':
	print_test(value.__doc__+' #'+name[4:], 2)
	try:
	    value()
	except:
	    print 'Error!', sys.exc_type, sys.exc_value
	    errors = errors+1

print errors, 'errors'

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/bugs/bugs101.py
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py