You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
@@ -15,7 +15,7 @@ else:
|
|||||||
def iteritems(d):
|
def iteritems(d):
|
||||||
return d.iteritems()
|
return d.iteritems()
|
||||||
|
|
||||||
from uncompyle6.semantics.pysource import SourceWalker as SourceWalker
|
from uncompyle6.semantics.pysource import (SourceWalker, deparse_code2str)
|
||||||
|
|
||||||
def test_template_engine():
|
def test_template_engine():
|
||||||
s = StringIO()
|
s = StringIO()
|
||||||
@@ -185,3 +185,11 @@ def test_tables():
|
|||||||
assert arg == len(entry), (
|
assert arg == len(entry), (
|
||||||
"%s[%s] arg %d should be length of entry %d. Full entry: %s" %
|
"%s[%s] arg %d should be length of entry %d. Full entry: %s" %
|
||||||
(name, k, arg, len(entry), entry))
|
(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
Reference in New Issue
Block a user