Skip to content

Commit 3b34efa

Browse files
committed
Add test for PyLong_FromUnicodeObject
1 parent 3b0955d commit 3b34efa

File tree

1 file changed

+16
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+16
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_long.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,19 @@ def compile_module(self, name):
406406
arguments=["PyObject* o"],
407407
cmpfunc=unhandled_error_compare
408408
)
409+
410+
test_PyLong_FromUnicodeObject = CPyExtFunction(
411+
lambda args: int(args[0], args[1]),
412+
lambda: (
413+
("10", 10),
414+
("-12341451234123512345", 8),
415+
("aa", 16),
416+
("asdf", 10),
417+
("", 10),
418+
("0", 0),
419+
),
420+
resultspec="O",
421+
argspec="Oi",
422+
arguments=["PyObject* n", "int base"],
423+
cmpfunc=unhandled_error_compare,
424+
)

0 commit comments

Comments
 (0)