Skip to content

Commit 3d9b73c

Browse files
committed
[GR-110033] add collections deque
PullRequest: graalpython/140
2 parents 8bd0626 + 9384e3c commit 3d9b73c

File tree

9 files changed

+1305
-49
lines changed

9 files changed

+1305
-49
lines changed

ci.jsonnet

+7-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
error "unknown field: "+field+" in "+object+", valid choices are: "+std.objectFields(object)
5454
else
5555
object[field],
56+
57+
graalOption: function(name, value)
58+
["--Ja", "@-Dgraal."+name+"="+value],
5659
},
5760

5861
// ------------------------------------------------------------------------------------------------------
@@ -191,9 +194,12 @@
191194
local baseGate = commonBuilder + {
192195
tags: "tags must be defined",
193196

197+
// local truffleDebugFlags = utils.graalOption("TraceTruffleCompilation", "true"),
198+
// local truffleDebugFlags = utils.graalOption("TraceTruffleCompilationDetails", "true"),
199+
local truffleDebugFlags = [],
194200
targets: TARGET.gate,
195201
run +: [
196-
["mx", "--strict-compliance", "--dynamicimports", super.dynamicImports, "--primary", "gate", "--tags", self.tags, "-B=--force-deprecation-as-warning-for-dependencies"],
202+
["mx"] + truffleDebugFlags + ["--strict-compliance", "--dynamicimports", super.dynamicImports, "--primary", "gate", "--tags", self.tags, "-B=--force-deprecation-as-warning-for-dependencies"],
197203
]
198204
},
199205

graalpython/com.oracle.graal.python.test/src/graalpytest.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@
5252
verbose = False
5353

5454

55+
def dump_truffle_ast(func):
56+
try:
57+
print(__dump_truffle_ast__(func))
58+
except:
59+
pass
60+
61+
5562
class SkipTest(BaseException):
5663
pass
5764

@@ -152,24 +159,24 @@ def assertSequenceEqual(self, expected, actual, msg=None):
152159
assert expected_value == next(actual_iter), msg
153160

154161
class assertRaises():
155-
156162
def __init__(self, exc_type, function=None, *args, **kwargs):
157-
if function is None:
163+
self.function = function
164+
if self.function is None:
158165
self.exc_type = exc_type
159166
else:
160167
try:
161-
function(*args, **kwargs)
168+
self.function(*args, **kwargs)
162169
except exc_type:
163170
pass
164171
else:
165-
assert False, "expected '%r' to raise '%r'" % (function, exc_type)
172+
assert False, "expected '%r' to raise '%r'" % (self.function, exc_type)
166173

167174
def __enter__(self):
168175
return self
169176

170177
def __exit__(self, exc_type, exc, traceback):
171178
if not exc_type:
172-
assert False, "expected '%r' to raise '%r'" % (function, exc_type)
179+
assert False, "expected '%r' to raise '%r'" % (self.function, exc_type)
173180
elif self.exc_type in exc_type.mro():
174181
self.exception = exc
175182
return True

0 commit comments

Comments
 (0)