Fix call to code_deparse call in deparse_code2str

Fixes #275
This commit is contained in:
rocky
2019-07-05 06:06:14 -04:00
parent c7124ad9ca
commit cc531cf90a
2 changed files with 728 additions and 575 deletions

View File

@@ -15,7 +15,7 @@ else:
def iteritems(d):
return d.iteritems()
from uncompyle6.semantics.pysource import SourceWalker as SourceWalker
from uncompyle6.semantics.pysource import (SourceWalker, deparse_code2str)
def test_template_engine():
s = StringIO()
@@ -185,3 +185,11 @@ def test_tables():
assert arg == len(entry), (
"%s[%s] arg %d should be length of entry %d. Full entry: %s" %
(name, k, arg, len(entry), entry))
def test_deparse_code2str():
def deparse_test(co):
"This is a docstring"
s = deparse_code2str(co, debug_opts={"asm": "after", "tree": True})
assert s
return
deparse_test(deparse_test.__code__)

File diff suppressed because it is too large Load Diff