Files
python-uncompyle6/pytest/test_load.py
rocky a08ece371e pydisassemble improvements; DRY scannners
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
2016-05-18 10:58:48 -04:00

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