You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
disas.py: - disassembles *all* code objects found scanner*.py: - no longer need to pass in version numbers; this is obtained from the class name - no longer pass in opcodes; this is done at initialization from the scanner name - all Pythoin 3 scanners support native disassembly
14 lines
494 B
Python
14 lines
494 B
Python
import os, sys
|
|
from uncompyle6.load import load_file, check_object_path, load_module
|
|
|
|
def test_load():
|
|
"""Basic test of load_file, check_object_path and load_module"""
|
|
co = load_file(__file__)
|
|
obj_path = check_object_path(__file__)
|
|
if os.path.exists(obj_path):
|
|
version, timestamp, magic_int, co2 = load_module(obj_path)
|
|
assert sys.version[0:3] == str(version)
|
|
assert co == co2
|
|
else:
|
|
assert True, "Skipped because we can't find %s" % obj_path
|