You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Add tests and start a more turnkey testing system.
This commit is contained in:
21
test/compile_tests
Executable file → Normal file
21
test/compile_tests
Executable file → Normal 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.'
|
||||
|
Reference in New Issue
Block a user