summaryrefslogtreecommitdiff
path: root/src/zope/tal/talpypy/test/check.py
blob: 48b1668274deda5a19694dc8f1c731a60ff4ca86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys

if len(sys.argv) == 2 and sys.argv[1] == 'so':
    print 'so extension'
    import test
else:    
    from pypy.interpreter.mixedmodule import testmodule
    test =  testmodule('test', 'zope.tal.pypy')

ip = test.Interpreter(None, 20)
assert ip.power2() == 400
assert ip.getInstance() is None

ip = test.Interpreter([1, 2], 10)
assert ip.power2() == 100
assert ip.getInstance() == [1, 2, 3]

print "tests passed"