Move scanners in its own directory. Dir base-tests -> base_tests so we

can import from that.
This commit is contained in:
rocky
2015-12-14 08:48:59 -05:00
parent f595f659ad
commit b5797dfa0f
61 changed files with 213 additions and 277 deletions

View File

@@ -28,11 +28,14 @@ check-short:
check-2.7-ok:
$(PYTHON) test_pythonlib.py --ok-2.7 --verify $(COMPILE)
clean: clean-py-dis clean-dis
clean: clean-py-dis clean-dis clean-unverified
clean-dis:
find . -name '*_dis' -exec rm -v '{}' ';'
clean-unverified:
find . -name '*_unverified' -exec rm -v '{}' ';'
#: Clean temporary compile/decompile/verify direcotries in /tmp
clean-py-dis:
rm -fr /tmp/py-dis-* || true

View File

@@ -1,28 +0,0 @@
# Embedded file name: /src/external-vcs/github/rocky/uncompyle6/test/base-tests/python2/test_applyEquiv.py
def kwfunc(**kwargs):
print kwargs.items()
def argsfunc(*args):
print args
def no_apply(*args, **kwargs):
print args
print kwargs.items()
argsfunc(34)
foo = argsfunc(*args)
argsfunc(*args)
argsfunc(34, *args)
kwfunc(**kwargs)
kwfunc(x=11, **kwargs)
no_apply(*args, **kwargs)
no_apply(34, *args, **kwargs)
no_apply(x=11, *args, **kwargs)
no_apply(34, x=11, *args, **kwargs)
no_apply(42, 34, x=11, *args, **kwargs)
no_apply(1, 2, 4, 8, a=2, b=3, c=5)

View File

@@ -1,57 +0,0 @@
# Embedded file name: /src/external-vcs/github/rocky/uncompyle6/test/base-tests/python2/test_augmentedAssign.py
raise "This program can't be run"
a = 1
b = 2
a += b
print a
a -= b
print a
a *= b
print a
a -= a
print a
a += 21
print a
l = [1, 2, 3]
l[1] *= 3
print l[1]
l[1][2][3] = 7
l[1][2][3] *= 3
l[:] += [9]
print l
l[:2] += [9]
print l
l[1:] += [9]
print l
l[1:4] += [9]
print l
l += [42, 43]
print l
a.value = 1
a.value += 1
a.b.val = 1
a.b.val += 1
l = []
for i in range(3):
lj = []
for j in range(3):
lk = []
for k in range(3):
lk.append(0)
lj.append(lk)
l.append(lj)
i = j = k = 1
def f():
global i
i += 1
return i
l[i][j][k] = 1
i = 1
l[f()][j][k] += 1
print i, l

View File

@@ -1,39 +0,0 @@
# Embedded file name: /src/external-vcs/github/rocky/uncompyle6/test/base-tests/python2/test_class.py
class A:
class A1:
def __init__(self):
print 'A1.__init__'
def foo(self):
print 'A1.foo'
def __init__(self):
print 'A.__init__'
def foo(self):
print 'A.foo'
class B:
def __init__(self):
print 'B.__init__'
def bar(self):
print 'B.bar'
class C(A, B):
def foobar(self):
print 'C.foobar'
c = C()
c.foo()
c.bar()
c.foobar()

View File

@@ -1,6 +0,0 @@
# Embedded file name: /src/external-vcs/github/rocky/uncompyle6/test/base-tests/python2/test_divide_future.py
from __future__ import division
print ' 1 // 2 =', 0
print '1.0 // 2.0 =', 0.0
print ' 1 / 2 =', 0.5
print '1.0 / 2.0 =', 0.5

View File

@@ -1,118 +0,0 @@
# Embedded file name: /src/external-vcs/github/rocky/uncompyle6/test/base-tests/python2/test_exceptions.py
import dis
def x11():
try:
a = 'try except'
except:
a = 2
b = '--------'
def x12():
try:
a = 'try except else(pass)'
except:
a = 2
b = '--------'
def x13():
try:
a = 'try except else(a=3)'
except:
a = 2
else:
a = 3
b = '--------'
def x21():
try:
a = 'try KeyError'
except KeyError:
a = 8
b = '--------'
def x22():
try:
a = 'try (IdxErr, KeyError) else(pass)'
except (IndexError, KeyError):
a = 8
b = '--------'
def x23():
try:
a = 'try KeyError else(a=9)'
except KeyError:
a = 8
else:
a = 9
b = '--------'
def x31():
try:
a = 'try KeyError IndexError'
except KeyError:
a = 8
except IndexError:
a = 9
b = '--------'
def x32():
try:
a = 'try KeyError IndexError else(pass)'
except KeyError:
a = 8
except IndexError:
a = 9
b = '--------'
def x33():
try:
a = 'try KeyError IndexError else(a=9)'
except KeyError:
a = 8
except IndexError:
a = 9
else:
a = 9
b = '#################'
def x41():
if a == 1:
a = 1
elif b == 1:
b = 1
else:
c = 1
b = '#################'
def x42():
if a == 1:
a = 1
elif b == 1:
b = 1
else:
c = 1
xxx = 'mmm'
if __name__ == '__main__':
dis.dis(xx)

View File

View File

@@ -70,7 +70,7 @@ test_options = {
'ok-2.7': [os.path.join(src_dir, 'ok_2.7'),
PYC, 'ok-2.7', 2.7],
'base-2.7': [os.path.join(src_dir, 'base-tests', 'python2.7'),
'base-2.7': [os.path.join(src_dir, 'base_tests', 'python2.7'),
PYC, 'base_2.7', 2.7],
}