You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
3.7 "imports" and "or"
This commit is contained in:
@@ -5,12 +5,15 @@
|
||||
|
||||
# RUNNABLE!
|
||||
import os.path as osp
|
||||
from sys import path
|
||||
from sys import platform
|
||||
from os import sep, name
|
||||
import collections.abc
|
||||
|
||||
assert osp.basename("a") == "a"
|
||||
assert path
|
||||
|
||||
assert isinstance(platform, str)
|
||||
assert sep
|
||||
assert name
|
||||
assert collections.abc
|
||||
import os.path as path
|
||||
assert path
|
||||
|
@@ -8,3 +8,14 @@ def foo(n):
|
||||
assert foo(95)
|
||||
assert not foo(94)
|
||||
assert not foo(96)
|
||||
|
||||
# from test_buffer.py
|
||||
# Bug was handling "or" inside a conditional
|
||||
def rslice(a, b):
|
||||
minlen = 0 if a or b else 1
|
||||
return minlen
|
||||
|
||||
assert rslice(False, False) == 1
|
||||
assert rslice(False, True) == 0
|
||||
assert rslice(True, False) == 0
|
||||
assert rslice(True, True) == 0
|
||||
|
Reference in New Issue
Block a user