You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
added some more test cases for BUILD_CONST_KEY_MAP
This commit is contained in:
@@ -6,10 +6,16 @@ from validate import validate_uncompyle
|
|||||||
|
|
||||||
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6')
|
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6')
|
||||||
@pytest.mark.parametrize('text', (
|
@pytest.mark.parametrize('text', (
|
||||||
"{-0.: 'a', -1: 'b'}",
|
"{0.: 'a', -1: 'b'}", # BUILD_MAP
|
||||||
"{0.: 'a', -1: 'b'}",
|
"{'a':'b'}", # BUILD_MAP
|
||||||
"{0: 1, 2: 3}",
|
"{0: 1}", # BUILD_MAP
|
||||||
"{-0: 1, 2: 3}",
|
"{b'0':1, b'2':3}", # BUILD_CONST_KEY_MAP
|
||||||
|
"{0: 1, 2: 3}", # BUILD_CONST_KEY_MAP
|
||||||
|
"{'a':'b','c':'d'}", # BUILD_CONST_KEY_MAP
|
||||||
|
"{0: 1, 2: 3}", # BUILD_CONST_KEY_MAP
|
||||||
|
"{'a': 1, 'b': 2}", # BUILD_ONST_KEY_MAP
|
||||||
|
"{'a':'b','c':'d'}", # BUILD_CONST_KEY_MAP
|
||||||
|
"{0.0:'b',0.1:'d'}", # BUILD_CONST_KEY_MAP
|
||||||
))
|
))
|
||||||
def test_build_const_key_map(text):
|
def test_build_const_key_map(text):
|
||||||
validate_uncompyle(text)
|
validate_uncompyle(text)
|
||||||
|
Reference in New Issue
Block a user