Add tests and start a more turnkey testing system.

This commit is contained in:
rocky
2015-12-13 00:25:34 -05:00
parent 832debeb70
commit 3d4e23cc9c
130 changed files with 12657 additions and 201 deletions

21
test/compile_tests Executable file → Normal file
View File

@@ -1,8 +1,12 @@
#!/usr/bin/env python
from __future__ import print_function
#!/usr/bin/env python2.3
"""
compile_tests -- compile test patterns for the decompyle test suite
This source is part of the decompyle test suite.
decompyle is a Python byte-code decompiler
See http://www.crazy-compilers.com/decompyle/ for
for further information
"""
import py_compile, os, sys, getopt
@@ -22,8 +26,8 @@ for opt, val in opts:
if args:
raise 'This tool does not want any arguments'
print("Using files in dir %s" % src_dir)
print("Compiling into dir %s" % work_dir)
print "Using files in dir %s" % src_dir
print "Compiling into dir %s" % work_dir
tests = {}
@@ -48,7 +52,6 @@ tests['2.3'] = tests['2.2']
tests['2.5'] = tests['2.3']
tests['2.6'] = tests['2.5']
tests['2.7'] = ['mine'] + tests['2.6']
tests['3.4'] = ['mine']
total_tests = len(tests['2.7'])
#tests['2.2'].sort(); print tests['2.2']
@@ -71,7 +74,7 @@ try:
except AttributeError:
version = sys.version[:3]
print('Compiling test files for Python', version)
print('(%i/%i files)' % (len(tests[version]), total_tests))
print 'Compiling test files for Python', version,
print '(%i/%i files)' % (len(tests[version]), total_tests)
compile_for_version(version)
print('Done.')
print 'Done.'