You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Better fstring handling for FORMAT_VALUE | 0x4
This commit is contained in:
@@ -134,6 +134,10 @@ if PYTHON_VERSION > 2.6:
|
||||
deparsed = deparse_code(PYTHON_VERSION, code, compile_mode='single')
|
||||
recompiled = compile(deparsed.text, '<string>', 'single')
|
||||
if recompiled != code:
|
||||
print(recompiled)
|
||||
print('================')
|
||||
print(code)
|
||||
print('----------------')
|
||||
assert 'dis(' + deparsed.text.strip('\n') + ')' == 'dis(' + expr.strip('\n') + ')'
|
||||
|
||||
|
||||
@@ -144,7 +148,7 @@ if PYTHON_VERSION > 2.6:
|
||||
run_test(fstring)
|
||||
|
||||
|
||||
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need Python 3.6+')
|
||||
@pytest.mark.skipif(PYTHON_VERSION != 3.6, reason='need Python 3.6+')
|
||||
@pytest.mark.parametrize('fstring', [
|
||||
"f'{abc}{abc!s}'",
|
||||
"f'{abc}0'",
|
||||
|
Reference in New Issue
Block a user