mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
fix c binding test
This commit is contained in:
parent
e1b2bda6aa
commit
a810973f65
@ -123,7 +123,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
PRINT_TITLE("test basic exec");
|
||||
check(pkpy_exec(vm, "print('hello world!')"));
|
||||
error(pkpy_getglobal(vm, pkpy_name("nonexistatn")));
|
||||
fail(pkpy_getglobal(vm, pkpy_name("nonexistatn")));
|
||||
|
||||
// test int methods
|
||||
PRINT_TITLE("test int methods");
|
||||
@ -367,7 +367,7 @@ int main(int argc, char** argv) {
|
||||
PRINT_TITLE("test other errors");
|
||||
check(pkpy_getglobal(vm, pkpy_name("test_error_propagate")));
|
||||
check(pkpy_pop_top(vm));
|
||||
error(pkpy_getglobal(vm, pkpy_name("nonexistant")));
|
||||
fail(pkpy_getglobal(vm, pkpy_name("nonexistant")));
|
||||
error(pkpy_exec(vm, "raise NameError('testing error throwing from python')"));
|
||||
|
||||
PRINT_TITLE("test TypeError");
|
||||
|
@ -1,9 +1,6 @@
|
||||
|
||||
====== test basic exec ======
|
||||
hello world!
|
||||
successfully errored with this message:
|
||||
Traceback (most recent call last):
|
||||
NameError: nonexistatn
|
||||
|
||||
====== test int methods ======
|
||||
11
|
||||
@ -79,9 +76,6 @@ NameError: catch me
|
||||
|
||||
====== test other errors ======
|
||||
successfully errored with this message:
|
||||
Traceback (most recent call last):
|
||||
NameError: nonexistant
|
||||
successfully errored with this message:
|
||||
Traceback (most recent call last):
|
||||
File "main.py", line 1
|
||||
raise NameError('testing error throwing from python')
|
||||
|
Loading…
x
Reference in New Issue
Block a user