You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Correct 3.7 "impor"t and "from .. import"
This commit is contained in:
BIN
test/bytecode_3.7_run/00_import.pyc
Normal file
BIN
test/bytecode_3.7_run/00_import.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.8_run/00_import.pyc
Normal file
BIN
test/bytecode_3.8_run/00_import.pyc
Normal file
Binary file not shown.
@@ -1,11 +1,23 @@
|
||||
# Tests all the different kinds of imports
|
||||
"""This program is self-checking!"""
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
from os import *
|
||||
from os import * # NOQA
|
||||
|
||||
import time as time1, os as os1
|
||||
import http.client as httpclient
|
||||
from sys import stdin, stdout, stderr
|
||||
|
||||
assert isinstance(os1.pathsep, str)
|
||||
|
||||
assert time1.time() > 0
|
||||
import os.path as osp
|
||||
|
||||
assert osp == path
|
||||
from os.path import join as jj
|
||||
assert path.join == jj
|
||||
|
||||
if len(__file__) == 0:
|
||||
# a.b.c should force consecutive LOAD_ATTRs
|
||||
import a.b.c as d
|
||||
import stuff0.stuff1.stuff2.stuff3 as stuff3
|
||||
|
||||
sys.exit(0)
|
||||
|
Reference in New Issue
Block a user