Skip to content

Commit b1b68a2

Browse files
committed
change debug=True output
1 parent 08eab75 commit b1b68a2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

jnius/jnius_export_class.pxi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,10 @@ cdef class JavaClass(object):
357357
)
358358
)
359359
scores.sort()
360+
score, definition, d_ret, d_args, args_ = scores[-1]
360361
if debug:
361362
print(scores)
362-
score, definition, d_ret, d_args, args_ = scores[-1]
363+
print("Selected %s for invocation" % definition)
363364

364365
try:
365366
# convert python arguments to java arguments
@@ -1169,9 +1170,10 @@ cdef class JavaMultipleMethod(object):
11691170
)
11701171
)
11711172
scores.sort()
1173+
score, signature = scores[-1]
11721174
if debug:
11731175
print(scores)
1174-
score, signature = scores[-1]
1176+
print("Selected %s for invocation" % signature)
11751177

11761178
jm = methods[signature]
11771179
jm.j_self = self.j_self

tests/test_signature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def test_params(self):
175175
def test_calc_signature(self):
176176
import sys
177177
clz = autoclass("org.jnius.SignatureTest$IntOrLong")
178-
obj = clz(0) # could be int or long
178+
obj = clz(0, debug=True) # could be int or long
179179
# this isnt truly deterministic, the two possible methods are tied for score
180180
self.assertTrue(obj.was_long)
181181

@@ -194,4 +194,4 @@ def test_calc_signature(self):
194194
self.assertFalse(obj.was_short)
195195

196196
autoclass("org.jnius.SignatureTest$ShortOnly")(0) # this should work as short
197-
autoclass("org.jnius.SignatureTest$ShortOnly")(0., debug=True) # this float should be cast to short
197+
autoclass("org.jnius.SignatureTest$ShortOnly")(0.) # this float should be cast to short

0 commit comments

Comments
 (0)